From 5272800a7e397f6fcc7933b474d182fec4d18b08 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 13 May 2020 16:36:57 +0200 Subject: change sorting reversing prefix to ~ Since - leads to structopt interpreting the component as the start of another argument, we need to use a different one. --- src/output/sorting.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/output/sorting.rs') diff --git a/src/output/sorting.rs b/src/output/sorting.rs index 8b271a9..4f5cf19 100644 --- a/src/output/sorting.rs +++ b/src/output/sorting.rs @@ -38,7 +38,7 @@ impl FromStr for Component { type Err = InvalidComponent; fn from_str(s: &str) -> Result { - if s.starts_with('-') { + if s.starts_with('~') { return s[1..].parse().map(|c| Component::Reverse(Box::new(c))); } match &s.to_lowercase() as &str { @@ -58,7 +58,7 @@ impl Display for Component { Component::Boss=> write!(f, "boss"), Component::Outcome => write!(f, "outcome"), Component::ChallengeMote => write!(f, "cm"), - Component::Reverse(ref inner) => write!(f, "-{}", inner), + Component::Reverse(ref inner) => write!(f, "~{}", inner), } } } -- cgit v1.2.3