Kaynağa Gözat

Fixed storage

Cesar Rodas 1 yıl önce
ebeveyn
işleme
b744b79925
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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)
     }