mirror of
https://github.com/uutils/coreutils
synced 2024-10-15 12:24:09 +00:00
cksum/hashsum: fix clippy warnings
This commit is contained in:
parent
193a81bcc3
commit
6e06c2a5ea
|
@ -362,6 +362,7 @@ fn determine_regex(
|
||||||
* Do the checksum validation (can be strict or not)
|
* Do the checksum validation (can be strict or not)
|
||||||
*/
|
*/
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
|
#[allow(clippy::cognitive_complexity)]
|
||||||
pub fn perform_checksum_validation<'a, I>(
|
pub fn perform_checksum_validation<'a, I>(
|
||||||
files: I,
|
files: I,
|
||||||
strict: bool,
|
strict: bool,
|
||||||
|
@ -410,7 +411,7 @@ where
|
||||||
|
|
||||||
// Process each line
|
// Process each line
|
||||||
for (i, line) in lines.iter().enumerate() {
|
for (i, line) in lines.iter().enumerate() {
|
||||||
if let Some(caps) = chosen_regex.captures(&line) {
|
if let Some(caps) = chosen_regex.captures(line) {
|
||||||
properly_formatted = true;
|
properly_formatted = true;
|
||||||
|
|
||||||
let mut filename_to_check = caps.name("filename").unwrap().as_str();
|
let mut filename_to_check = caps.name("filename").unwrap().as_str();
|
||||||
|
@ -481,7 +482,7 @@ where
|
||||||
}
|
}
|
||||||
let mut algo = detect_algo(&algo_name, length)?;
|
let mut algo = detect_algo(&algo_name, length)?;
|
||||||
|
|
||||||
let (filename_to_check_unescaped, prefix) = unescape_filename(&filename_to_check);
|
let (filename_to_check_unescaped, prefix) = unescape_filename(filename_to_check);
|
||||||
|
|
||||||
// manage the input file
|
// manage the input file
|
||||||
let file_to_check: Box<dyn Read> = if filename_to_check == "-" {
|
let file_to_check: Box<dyn Read> = if filename_to_check == "-" {
|
||||||
|
|
Loading…
Reference in a new issue