fix: move back to sled stable

This commit is contained in:
Timo Kösters
2021-04-11 10:12:05 +02:00
parent 84f4ce73e5
commit 044e65afcc
4 changed files with 68 additions and 74 deletions

View File

@@ -108,7 +108,7 @@ impl Database {
pub async fn load_or_create(config: Config) -> Result<Self> {
let db = sled::Config::default()
.path(&config.database_path)
.cache_capacity(config.cache_capacity as usize)
.cache_capacity(config.cache_capacity as u64)
.use_compression(true)
.open()?;
@@ -301,7 +301,8 @@ impl Database {
}
pub async fn flush(&self) -> Result<()> {
self._db.flush_async().await?;
// noop while we don't use sled 1.0
//self._db.flush_async().await?;
Ok(())
}
}