Cesar Rodas преди 3 месеца
родител
ревизия
22d41c9346
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. 2 3
      crates/storage/memory/src/lib.rs

+ 2 - 3
crates/storage/memory/src/lib.rs

@@ -7,7 +7,6 @@ use std::{
         atomic::{AtomicUsize, Ordering},
         Arc,
     },
-    u64,
 };
 use tokio::sync::RwLock;
 
@@ -80,7 +79,7 @@ impl Storage for Memory {
                 .ids_by_time
                 .write()
                 .await
-                .insert(secondary_index.index_by(&time_desc), event_id.clone());
+                .insert(secondary_index.index_by(time_desc), event_id.clone());
 
             indexes
                 .author
@@ -133,7 +132,7 @@ impl Storage for Memory {
     async fn set_local_event(&self, event: &Event) -> Result<(), Error> {
         let mut local_events = self.indexes.local_events.write().await;
         local_events.insert(
-            SecondaryIndex::new(&event.id, event.created_at()).index_by(&[]),
+            SecondaryIndex::new(&event.id, event.created_at()).index_by([]),
             event.id.0.to_vec(),
         );
         Ok(())