chore: change to byte slice

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-27 20:16:27 +02:00
parent d3beab5006
commit 541b9b22d2
10 changed files with 829 additions and 746 deletions

View File

@@ -26,13 +26,6 @@ impl std::ops::Deref for EventService {
}
}
impl Default for EventService {
fn default() -> Self {
Self(Arc::new(DefaultEventService::default()))
}
}
#[derive(Default)]
struct DefaultEventService {
db: Db,
}
@@ -84,6 +77,7 @@ impl EventServiceTrait for DefaultEventService {
let events = events
.iter()
.map(|x| x.as_slice())
.flat_map(LogEvent::deserialize_capnp)
.sorted_by_key(|i| i.timestamp)
.collect();