mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 15:07:47 +00:00
refactor/polish ~ fix cargo clippy
complaints (if is_none => as_ref()?)
This commit is contained in:
parent
88db11a328
commit
1642933275
1 changed files with 1 additions and 3 deletions
|
@ -338,9 +338,7 @@ fn show_help(opts: &getopts::Options) {
|
|||
// TODO: Add support for all postfixes here up to and including EiB
|
||||
// http://www.gnu.org/software/coreutils/manual/coreutils.html#Block-size
|
||||
fn get_size(size_str_opt: Option<String>) -> Option<u64> {
|
||||
if size_str_opt.is_none() {
|
||||
return None;
|
||||
}
|
||||
size_str_opt.as_ref()?;
|
||||
|
||||
let mut size_str = size_str_opt.as_ref().unwrap().clone();
|
||||
// Immutably look at last character of size string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue