fix: resolve all clippy warnings and enforce cargo fmt
- display_helpers: convert module doc-comments to regular comments, merge identical text/markdown + text/ branches - search_service: replace needless range loops with slice-based pagination - folder_repository, folder_db_repository: collapse nested if statements - favorites_pg_repository: remove unnecessary borrow on generic arg - file_blob_read_repository: collapse 6 nested if-let blocks - file_blob_write_repository: collapse nested if for dedup ref decrement - chunked_upload_service: use div_ceil(), collapse 2 nested if blocks - folder_handler: collapse nested if-let for owner check - webdav_handler: replace 7x io::Error::new(ErrorKind::Other, ..) with io::Error::other(..) - cargo fmt applied to all files Passes: cargo clippy --all-targets --all-features -- -D warnings
This commit is contained in:
@@ -39,13 +39,12 @@ impl Argon2PasswordHasher {
|
||||
///
|
||||
/// Panics at startup if the parameters are invalid (caught immediately).
|
||||
pub fn new(memory_cost: u32, time_cost: u32, parallelism: u32) -> Self {
|
||||
let params = Params::new(memory_cost, time_cost, parallelism, None)
|
||||
.unwrap_or_else(|e| {
|
||||
panic!(
|
||||
"Invalid Argon2 parameters (m={}, t={}, p={}): {}",
|
||||
memory_cost, time_cost, parallelism, e
|
||||
)
|
||||
});
|
||||
let params = Params::new(memory_cost, time_cost, parallelism, None).unwrap_or_else(|e| {
|
||||
panic!(
|
||||
"Invalid Argon2 parameters (m={}, t={}, p={}): {}",
|
||||
memory_cost, time_cost, parallelism, e
|
||||
)
|
||||
});
|
||||
|
||||
tracing::info!(
|
||||
"Argon2PasswordHasher initialized: m_cost={} KiB, t_cost={}, p_cost={}",
|
||||
|
||||
Reference in New Issue
Block a user