Przeglądaj źródła

Put misfire.rs in a nicer order

The main type is now at the top.
Benjamin Sago 8 lat temu
rodzic
commit
1824313cda
1 zmienionych plików z 11 dodań i 10 usunięć
  1. 11 10
      src/options/misfire.rs

+ 11 - 10
src/options/misfire.rs

@@ -8,16 +8,6 @@ use options::{flags, HelpString, VersionString};
 use options::parser::{Arg, Flag, ParseError};
 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
 /// A **misfire** is a thing that can happen instead of listing files -- a
 /// catch-all for anything outside the program’s normal execution.
 /// catch-all for anything outside the program’s normal execution.
 #[derive(PartialEq, Debug)]
 #[derive(PartialEq, Debug)]
@@ -132,3 +122,14 @@ impl Misfire {
         None
         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(", "))
+    }
+}