Put misfire.rs in a nicer order

The main type is now at the top.
This commit is contained in:
Benjamin Sago 2017-09-13 23:49:30 +01:00
parent 43bbf00478
commit 1824313cda

View File

@ -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 programs 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(", "))
}
}