diff options
| author | Daniel <kingdread@gmx.de> | 2020-10-10 12:39:24 +0200 | 
|---|---|---|
| committer | Daniel <kingdread@gmx.de> | 2020-10-10 12:39:24 +0200 | 
| commit | 5836c7d87f26f004cc4433ffd2c6a2f97f67050b (patch) | |
| tree | d8c5383358021a1e6b939c1f6da7ef231b666566 /src/output | |
| parent | 535f5bdbddb5faf784587242a54c94b77fc7405d (diff) | |
| download | raidgrep-5836c7d87f26f004cc4433ffd2c6a2f97f67050b.tar.gz raidgrep-5836c7d87f26f004cc4433ffd2c6a2f97f67050b.tar.bz2 raidgrep-5836c7d87f26f004cc4433ffd2c6a2f97f67050b.zip | |
fix lints
Diffstat (limited to 'src/output')
| -rw-r--r-- | src/output/sorting.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/output/sorting.rs b/src/output/sorting.rs index 628a1a8..911a7df 100644 --- a/src/output/sorting.rs +++ b/src/output/sorting.rs @@ -40,8 +40,8 @@ impl FromStr for Component {      type Err = InvalidComponent;      fn from_str(s: &str) -> Result<Self, Self::Err> { -        if s.starts_with('~') { -            return s[1..].parse().map(|c| Component::Reverse(Box::new(c))); +        if let Some(stripped) = s.strip_prefix('~') { +            return stripped.parse().map(|c| Component::Reverse(Box::new(c)));          }          match &s.to_lowercase() as &str {              "date" => Ok(Component::Date), | 
