clean up the easy clippy errors

I'm still not running clippy on CI and probably should.
There are a few left that were a little more involved to address.
This commit is contained in:
Scott Lamb
2022-09-28 09:29:16 -07:00
parent b03eceb21a
commit 0866b23991
23 changed files with 42 additions and 47 deletions

View File

@@ -92,7 +92,7 @@ impl UserChange {
pub fn set_password(&mut self, pwd: String) {
let salt = SaltString::generate(&mut scrypt::password_hash::rand_core::OsRng);
let params = PARAMS.lock().clone();
let params = *PARAMS.lock();
let hash = scrypt::Scrypt
.hash_password_customized(pwd.as_bytes(), None, None, params, &salt)
.unwrap();
@@ -142,7 +142,7 @@ impl rusqlite::types::FromSql for FromSqlIpAddr {
use rusqlite::types::ValueRef;
match value {
ValueRef::Null => Ok(FromSqlIpAddr(None)),
ValueRef::Blob(ref b) => match b.len() {
ValueRef::Blob(b) => match b.len() {
4 => {
let mut buf = [0u8; 4];
buf.copy_from_slice(b);