Skip to content

Commit a3a7330

Browse files
committed
Small clippy fix
1 parent 1682730 commit a3a7330

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hasher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const BUFFER_SIZE: usize = 4096 * 8;
1616
fn hash_file<D: Digest>(filename: impl AsRef<str>) -> anyhow::Result<Output<D>> {
1717
let filesize = usize::try_from(file_size(filename.as_ref())?).ok();
1818

19-
if filesize.map_or(false, |size| size <= BUFFER_SIZE) {
19+
if filesize.is_some_and(|size| size <= BUFFER_SIZE) {
2020
// this file is smaller than the buffer size, so we can hash it all at once
2121
return hash_file_whole::<D>(filename);
2222
}

0 commit comments

Comments
 (0)