diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs index 922bf768854ea..06b96424c014e 100644 --- a/src/libgetopts/lib.rs +++ b/src/libgetopts/lib.rs @@ -95,8 +95,7 @@ use std::cmp::PartialEq; use std::fmt; -use std::result::{Err, Ok}; -use std::result; +use std::result::{Err, Ok, Result}; use std::string::String; /// Name of an option. Either a string or a single char. @@ -210,9 +209,6 @@ pub enum FailType { UnexpectedArgument_, } -/// The result of parsing a command line with a set of options. -pub type Result = result::Result; - impl Name { fn from_str(nm: &str) -> Name { if nm.len() == 1u { @@ -533,7 +529,7 @@ impl fmt::Show for Fail_ { /// `opt_str`, etc. to interrogate results. Returns `Err(Fail_)` on /// failure: use the `Show` implementation of `Fail_` to display /// information about it. -pub fn getopts(args: &[String], optgrps: &[OptGroup]) -> Result { +pub fn getopts(args: &[String], optgrps: &[OptGroup]) -> Result { let opts: Vec = optgrps.iter().map(|x| x.long_to_short()).collect(); let n_opts = opts.len();