diff options
Diffstat (limited to 'src/libgetopts')
| -rw-r--r-- | src/libgetopts/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs index 57ce53e73b0..fe059076926 100644 --- a/src/libgetopts/lib.rs +++ b/src/libgetopts/lib.rs @@ -331,9 +331,8 @@ impl Matches { /// Returns the string argument supplied to one of several matching options or `None`. pub fn opts_str(&self, names: &[String]) -> Option<String> { for nm in names { - match self.opt_val(&nm[..]) { - Some(Val(ref s)) => return Some(s.clone()), - _ => (), + if let Some(Val(ref s)) = self.opt_val(&nm[..]) { + return Some(s.clone()) } } None |
