Ver Fonte

Fixed storage

Cesar Rodas há 1 ano atrás
pai
commit
b744b79925
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      crates/storage/src/rocksdb.rs

+ 1 - 1
crates/storage/src/rocksdb.rs

@@ -356,7 +356,7 @@ impl RocksDb {
         // It should be sorted until an internal HashSet can be created, one that
         // respects the inserts time, because the database is sorted already by time
         // desc
-        events.sort_by(|a, b| b.created_at().cmp(&a.created_at()));
+        events.sort_by_key(|b| std::cmp::Reverse(b.created_at()));
 
         Ok(events)
     }