clippy fix

This commit is contained in:
Jörn-Michael Miehe 2025-07-03 19:13:54 +00:00
parent 52d455e219
commit 6ba17d57df
4 changed files with 8 additions and 7 deletions

View file

@ -121,15 +121,16 @@ impl Error {
}
}
pub fn is_mismatch<E, A>(&self, has_expected: E, has_actual: A) -> bool
pub fn is_mismatch<E, A>(&self, want_expected: E, want_actual: A) -> bool
where
String: PartialEq<E> + PartialEq<A>,
E: AsRef<str>,
A: AsRef<str>,
{
matches!(
self,
Self::Mismatch { expected, actual }
if *expected == has_expected
&& *actual == has_actual
if expected == want_expected.as_ref()
&& actual == want_actual.as_ref()
)
}

View file

@ -104,7 +104,7 @@ impl FileTrait for Checked {
super::check_hash(
&self.path,
self.size,
self.hash.as_ref().map(String::as_str),
self.hash.as_deref(),
on_progress,
)
}

View file

@ -16,7 +16,7 @@ pub use uploading::Uploading;
const HASH_CHUNK_SIZE: usize = 4 * 1024 * 1024;
/// compute hash for a file given its path.
/// Hash function: BLAKE2b, 512 bit
/// Hash function: `BLAKE2b`, 512 bit
///
/// # Params
///

View file

@ -107,7 +107,7 @@ impl FileTrait for Uploading {
super::check_hash(
&self.path,
self.size,
self.hash.as_ref().map(String::as_str),
self.hash.as_deref(),
on_progress,
)
}