mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
clippy: fix warnings from needless_return lint
This commit is contained in:
parent
30f300c52b
commit
49e4eba078
3 changed files with 6 additions and 6 deletions
|
|
@ -120,7 +120,7 @@ fn format_float(f: f64, width: usize, precision: usize) -> String {
|
|||
} else if l == -1 {
|
||||
format!("{f:width$.precision$}")
|
||||
} else {
|
||||
return format_f64_exp_precision(f, width, precision - 1); // subnormal numbers
|
||||
format_f64_exp_precision(f, width, precision - 1) // subnormal numbers
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -630,9 +630,9 @@ where
|
|||
} else if input == "-" {
|
||||
// STDIN stream that did not fit all content into a buffer
|
||||
// Most likely continuous/infinite input stream
|
||||
return Err(io::Error::other(
|
||||
Err(io::Error::other(
|
||||
translate!("split-error-cannot-determine-input-size", "input" => input),
|
||||
));
|
||||
))
|
||||
} else {
|
||||
// Could be that file size is larger than set read limit
|
||||
// Get the file size from filesystem metadata
|
||||
|
|
@ -655,9 +655,9 @@ where
|
|||
// Give up and return an error
|
||||
// TODO It might be possible to do more here
|
||||
// to address all possible file types and edge cases
|
||||
return Err(io::Error::other(
|
||||
Err(io::Error::other(
|
||||
translate!("split-error-cannot-determine-file-size", "input" => input),
|
||||
));
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -989,7 +989,7 @@ fn process_checksum_line(
|
|||
process_non_algo_based_line(i, &line_info, cli_algo, cli_algo_length, opts)
|
||||
} else {
|
||||
// We have no clue of what algorithm to use
|
||||
return Err(LineCheckError::ImproperlyFormatted);
|
||||
Err(LineCheckError::ImproperlyFormatted)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue