DB: Remove some unnecessary code

This commit is contained in:
ProtoByter 2022-09-06 17:36:09 +01:00
parent fe49220b64
commit f03ee88b74
2 changed files with 2 additions and 3 deletions

View File

@ -53,7 +53,7 @@ impl DbBackend for RedisBackend {
fn disconnect(&mut self) -> Result<(), String> { fn disconnect(&mut self) -> Result<(), String> {
log(LogType::Info, LogArea::Db, "Disconnecting from database"); log(LogType::Info, LogArea::Db, "Disconnecting from database");
drop(self.conn.take()); self.conn.take();
return Ok(()) return Ok(())
} }
} }

View File

@ -57,8 +57,7 @@ impl DbBackend for SqliteBackend {
fn disconnect(&mut self) -> Result<(), String> { fn disconnect(&mut self) -> Result<(), String> {
log(LogType::Info, LogArea::Db, "Disconnecting from database"); log(LogType::Info, LogArea::Db, "Disconnecting from database");
drop(self.conn.take()); self.conn.take();
self.conn = None;
Ok(()) Ok(())
} }
} }