Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,17 +713,7 @@ pub enum Fail {
UnexpectedArgument(String),
}

impl Error for Fail {
fn description(&self) -> &str {
match *self {
ArgumentMissing(_) => "missing argument",
UnrecognizedOption(_) => "unrecognized option",
OptionMissing(_) => "missing option",
OptionDuplicated(_) => "duplicated option",
UnexpectedArgument(_) => "unexpected argument",
}
}
}
impl Error for Fail {}

/// The result of parsing a command line with a set of options.
pub type Result = result::Result<Matches, Fail>;
Expand Down