diff --git a/src/shred/shred.rs b/src/shred/shred.rs index b12885045..e28874b0b 100644 --- a/src/shred/shred.rs +++ b/src/shred/shred.rs @@ -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) -> Option { - 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