瀏覽代碼

Fixed storage

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)
     }