From 4c8ceeb809e8744f3c28f712ff56cfb7ebe71ce7 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 6 Feb 2020 09:36:47 +1000 Subject: [PATCH] remove duplicate method --- rslib/src/media/database.rs | 8 +------- rslib/src/media/mod.rs | 5 ----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/rslib/src/media/database.rs b/rslib/src/media/database.rs index 4c91f24a1..dbc2b31c9 100644 --- a/rslib/src/media/database.rs +++ b/rslib/src/media/database.rs @@ -207,12 +207,6 @@ delete from media where fname=?" Ok(()) } - pub(super) fn clear(&mut self) -> Result<()> { - self.db - .execute_batch("delete from media; update meta set lastUsn = 0, dirMod = 0") - .map_err(Into::into) - } - pub(super) fn count(&mut self) -> Result { self.db .query_row( @@ -247,7 +241,7 @@ delete from media where fname=?" pub(super) fn force_resync(&mut self) -> Result<()> { self.db - .execute_batch("delete from media; update meta set lastUsn=0, dirMod=0") + .execute_batch("delete from media; update meta set lastUsn = 0, dirMod = 0") .map_err(Into::into) } } diff --git a/rslib/src/media/mod.rs b/rslib/src/media/mod.rs index 6674427ff..1648cb47b 100644 --- a/rslib/src/media/mod.rs +++ b/rslib/src/media/mod.rs @@ -94,11 +94,6 @@ impl MediaManager { Ok(chosen_fname) } - // forceResync - pub fn clear(&mut self) -> Result<()> { - self.dbctx().transact(|ctx| ctx.clear()) - } - fn dbctx(&self) -> MediaDatabaseContext { MediaDatabaseContext::new(&self.db) }