diff --git a/src/uu/dmesg/src/dmesg.rs b/src/uu/dmesg/src/dmesg.rs index 8f53085..d09c93e 100644 --- a/src/uu/dmesg/src/dmesg.rs +++ b/src/uu/dmesg/src/dmesg.rs @@ -107,11 +107,9 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { dmesg.level_filters = Some(level_filters); } if let Some(since) = matches.get_one::(options::SINCE) { - let since = remove_enclosing_quotes(since); dmesg.since_filter = Some(time_formatter::parse_datetime(since)?); } if let Some(until) = matches.get_one::(options::UNTIL) { - let until = remove_enclosing_quotes(until); dmesg.until_filter = Some(time_formatter::parse_datetime(until)?); } dmesg.print()?; @@ -491,13 +489,3 @@ impl TryFrom for Facility { } } } - -fn remove_enclosing_quotes(value: &str) -> &str { - if (value.starts_with('"') || value.starts_with('\'')) - && (value.ends_with('"') || value.ends_with('\'')) - { - &value[1..value.len() - 1] - } else { - value - } -}