|
@@ -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(())
|