diff options
author | Benjamin Sago <ogham@bsago.me> | 2017-09-13 23:49:30 +0100 |
---|---|---|
committer | Benjamin Sago <ogham@bsago.me> | 2017-09-13 23:49:30 +0100 |
commit | 1824313cda6dda521973fa32bd8f3090520fe077 (patch) | |
tree | ae06978893be933e2c388691f093ada0b626fcd9 | |
parent | 43bbf004781f06d62acf3952a4c5dd343ce1079a (diff) |
Put misfire.rs in a nicer order
The main type is now at the top.
-rw-r--r-- | src/options/misfire.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/options/misfire.rs b/src/options/misfire.rs index 42e4bc2..b2a716e 100644 --- a/src/options/misfire.rs +++ b/src/options/misfire.rs @@ -8,16 +8,6 @@ use options::{flags, HelpString, VersionString}; use options::parser::{Arg, Flag, ParseError}; -/// A list of legal choices for an argument-taking option -#[derive(PartialEq, Debug)] -pub struct Choices(&'static [&'static str]); - -impl fmt::Display for Choices { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "choices: {}", self.0.join(", ")) - } -} - /// A **misfire** is a thing that can happen instead of listing files -- a /// catch-all for anything outside the program’s normal execution. #[derive(PartialEq, Debug)] @@ -132,3 +122,14 @@ impl Misfire { None } } + + +/// A list of legal choices for an argument-taking option. +#[derive(PartialEq, Debug)] +pub struct Choices(&'static [&'static str]); + +impl fmt::Display for Choices { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "choices: {}", self.0.join(", ")) + } +} |