From f03ee88b745dbf563dc32fde1e2682e2cf838f38 Mon Sep 17 00:00:00 2001 From: ProtoByter Date: Tue, 6 Sep 2022 17:36:09 +0100 Subject: [PATCH] DB: Remove some unnecessary code --- src/db/redis/mod.rs | 2 +- src/db/sqlite/mod.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/db/redis/mod.rs b/src/db/redis/mod.rs index 78caff8..936fa97 100644 --- a/src/db/redis/mod.rs +++ b/src/db/redis/mod.rs @@ -53,7 +53,7 @@ impl DbBackend for RedisBackend { fn disconnect(&mut self) -> Result<(), String> { log(LogType::Info, LogArea::Db, "Disconnecting from database"); - drop(self.conn.take()); + self.conn.take(); return Ok(()) } } \ No newline at end of file diff --git a/src/db/sqlite/mod.rs b/src/db/sqlite/mod.rs index 764ede5..c56dd33 100644 --- a/src/db/sqlite/mod.rs +++ b/src/db/sqlite/mod.rs @@ -57,8 +57,7 @@ impl DbBackend for SqliteBackend { fn disconnect(&mut self) -> Result<(), String> { log(LogType::Info, LogArea::Db, "Disconnecting from database"); - drop(self.conn.take()); - self.conn = None; + self.conn.take(); Ok(()) } } \ No newline at end of file