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

@@ -1,6 +1,6 @@
use core::slice::SlicePattern;
use std::path::{Path, PathBuf};
use std::path::{Path};
use std::sync::Arc;
use async_trait::async_trait;
@@ -22,22 +22,10 @@ impl std::ops::Deref for Db {
}
}
impl Default for Db {
fn default() -> Self {
Self(Arc::new(DefaultDb::default()))
}
}
struct DefaultDb {
db: sled::Db,
}
impl Default for DefaultDb {
fn default() -> Self {
Self::new(&PathBuf::from("churn-server.sled"))
}
}
impl DefaultDb {
pub fn new(path: &Path) -> Self {
Self {