mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 14:12:31 +00:00
change string literal into char literal
This commit is contained in:
parent
e6ee773277
commit
58d44a6450
2 changed files with 2 additions and 2 deletions
|
@ -206,7 +206,7 @@ pub fn build() -> App<'static, 'static> {
|
|||
|
||||
fn validate_date_argument(arg: String) -> Result<(), String> {
|
||||
use std::error::Error;
|
||||
if arg.starts_with("+") {
|
||||
if arg.starts_with('+') {
|
||||
validate_time_format(&arg).map_err(|err| err.description().to_string())
|
||||
} else if &arg == "date" {
|
||||
Result::Ok(())
|
||||
|
|
|
@ -260,7 +260,7 @@ impl<'a> From<&'a str> for DateFlag {
|
|||
match time {
|
||||
"date" => DateFlag::Date,
|
||||
"relative" => DateFlag::Relative,
|
||||
time if time.starts_with("+") => DateFlag::Formatted(time[1..].to_owned()),
|
||||
time if time.starts_with('+') => DateFlag::Formatted(time[1..].to_owned()),
|
||||
_ => panic!("invalid \"time\" flag: {}", time),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue