mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 15:07:47 +00:00
refactor/polish ~ fix cargo clippy
complaints (borrowed_box)
This commit is contained in:
parent
8f2cdcfcb5
commit
6131f6f0e1
1 changed files with 3 additions and 3 deletions
|
@ -442,7 +442,7 @@ fn hashsum(
|
|||
let f = safe_unwrap!(File::open(ck_filename));
|
||||
let mut ckf = BufReader::new(Box::new(f) as Box<dyn Read>);
|
||||
let real_sum = safe_unwrap!(digest_reader(
|
||||
&mut digest,
|
||||
&mut *digest,
|
||||
&mut ckf,
|
||||
binary_check,
|
||||
output_bits
|
||||
|
@ -459,7 +459,7 @@ fn hashsum(
|
|||
}
|
||||
}
|
||||
} else {
|
||||
let sum = safe_unwrap!(digest_reader(&mut digest, &mut file, binary, output_bits));
|
||||
let sum = safe_unwrap!(digest_reader(&mut *digest, &mut file, binary, output_bits));
|
||||
if tag {
|
||||
println!("{} ({}) = {}", algoname, filename, sum);
|
||||
} else {
|
||||
|
@ -482,7 +482,7 @@ fn hashsum(
|
|||
}
|
||||
|
||||
fn digest_reader<'a, T: Read>(
|
||||
digest: &mut Box<dyn Digest + 'a>,
|
||||
digest: &mut (dyn Digest + 'a),
|
||||
reader: &mut BufReader<T>,
|
||||
binary: bool,
|
||||
output_bits: usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue