Ver Fonte

Fixed clippy

Cesar Rodas há 3 meses atrás
pai
commit
22d41c9346
1 ficheiros alterados com 2 adições e 3 exclusões
  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(())