Skip to content

Commit

Permalink
fix(from_usage): trim all whitespace before parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Apr 13, 2015
1 parent b302b8b commit 91d2904
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ impl<'a, 'v, 'ab, 'u, 'ar> App<'a, 'v, 'ab, 'u, 'ar>{
/// ```
pub fn args_from_usage(mut self, usage: &'ar str) -> App<'a, 'v, 'ab, 'u, 'ar> {
for l in usage.lines() {
self = self.arg(Arg::from_usage(l));
self = self.arg(Arg::from_usage(l.trim()));
}
self
}
Expand Down
2 changes: 1 addition & 1 deletion src/usageparser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@ impl<'u> Iterator for UsageParser<'u> {
}
}
}
}
}

0 comments on commit 91d2904

Please sign in to comment.