Cesar Rodas преди 1 година
родител
ревизия
b744b79925
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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)
     }