Deprecate Database::flush() function

The Database::flush() function is only needed for the sled database on mobile, instead for mobile use the sqlite database.
This commit is contained in:
Steve Myers
2022-04-02 09:52:44 -07:00
parent 0621ca89d5
commit a111d25476
3 changed files with 6 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ macro_rules! impl_from {
macro_rules! impl_inner_method {
( $enum_name:ident, $self:expr, $name:ident $(, $args:expr)* ) => {
#[allow(deprecated)]
match $self {
$enum_name::Memory(inner) => inner.$name( $($args, )* ),
#[cfg(feature = "key-value-db")]

View File

@@ -159,6 +159,10 @@ 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>;
}