refactor: follow clippy recommendation :
- Remove unused constructor for Table & Column - Add .expect in databases. disconnect - Remove usedless String::from in column serializer
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use rusqlite::{Connection, Result, Error};
|
||||
use rusqlite::{Connection, Result};
|
||||
|
||||
pub fn connect(db_connection: String) -> Result<Connection> {
|
||||
Connection::open(db_connection)
|
||||
@@ -8,6 +8,6 @@ pub fn run_command(connection: &Connection, sql: String) -> Result<usize> {
|
||||
connection.execute(sql.as_str(), [])
|
||||
}
|
||||
|
||||
pub fn disconnect(connection: Connection) -> Result<(), (Connection, Error)> {
|
||||
connection.close()
|
||||
pub fn disconnect(connection: Connection) {
|
||||
connection.close().expect("Error closing sqlite connection");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user