feat: make clippy happy & update denpendencies
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use rusqlite::{Connection, params};
|
||||
use rust_util::{debugging, information, opt_result, simple_error, success, XResult};
|
||||
|
||||
pub const DEFAULT_MASTER_KEY_VERIFICATION_KEY: &'static str = "__master_verification_key";
|
||||
pub const DEFAULT_MASTER_KEY_VERIFICATION_KEY: &str = "__master_verification_key";
|
||||
|
||||
pub struct Key {
|
||||
pub name: String,
|
||||
@@ -44,7 +44,7 @@ pub fn insert_key(conn: &Connection, key: &Key) -> XResult<()> {
|
||||
let default_comment = "".to_string();
|
||||
let _ = conn.execute(
|
||||
"INSERT INTO keys (name, value, comment) VALUES (?1, ?2, ?3)",
|
||||
(&key.name, &key.encrypted_key, key.comment.as_ref().unwrap_or_else(|| &default_comment)),
|
||||
(&key.name, &key.encrypted_key, key.comment.as_ref().unwrap_or(&default_comment)),
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user