remove Database::flush

This commit is contained in:
KaFai Choi
2022-03-23 10:58:05 +07:00
committed by KaFai Choi
parent 17d0ae0f71
commit e68d3b9e63
6 changed files with 1 additions and 23 deletions

View File

@@ -255,10 +255,6 @@ impl Database for AnyDatabase {
fn increment_last_index(&mut self, keychain: KeychainKind) -> Result<u32, Error> {
impl_inner_method!(AnyDatabase, self, increment_last_index, keychain)
}
fn flush(&mut self) -> Result<(), Error> {
impl_inner_method!(AnyDatabase, self, flush)
}
}
impl BatchOperations for AnyBatch {

View File

@@ -402,10 +402,6 @@ impl Database for Tree {
Ok(val)
})
}
fn flush(&mut self) -> Result<(), Error> {
Ok(Tree::flush(self).map(|_| ())?)
}
}
impl BatchDatabase for Tree {

View File

@@ -449,10 +449,6 @@ impl Database for MemoryDatabase {
Ok(*value)
}
fn flush(&mut self) -> Result<(), Error> {
Ok(())
}
}
impl BatchDatabase for MemoryDatabase {

View File

@@ -158,13 +158,6 @@ pub trait Database: BatchOperations {
///
/// It should insert and return `0` if not present in the database
fn increment_last_index(&mut self, keychain: KeychainKind) -> Result<u32, Error>;
#[deprecated(
since = "0.18.0",
note = "The flush function is only needed for the sled database on mobile, instead for mobile use the sqlite database."
)]
/// Force changes to be written to disk
fn flush(&mut self) -> Result<(), Error>;
}
/// Trait for a database that supports batch operations

View File

@@ -891,10 +891,6 @@ impl Database for SqliteDatabase {
}
}
}
fn flush(&mut self) -> Result<(), Error> {
Ok(())
}
}
impl BatchDatabase for SqliteDatabase {