diff options
Diffstat (limited to 'src/args.rs')
-rw-r--r-- | src/args.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/args.rs b/src/args.rs index d0990fdc..0c25727f 100644 --- a/src/args.rs +++ b/src/args.rs @@ -994,7 +994,7 @@ impl<'a> ArgMatches<'a> { } fn value_of_lossy(&self, name: &str) -> Option<String> { - self.values_of_lossy(name).and_then(|mut vals| vals.pop()) + self.0.value_of_lossy(name).map(|s| s.into_owned()) } fn values_of_lossy(&self, name: &str) -> Option<Vec<String>> { @@ -1002,7 +1002,7 @@ impl<'a> ArgMatches<'a> { } fn value_of_os(&'a self, name: &str) -> Option<&'a OsStr> { - self.values_of_os(name).and_then(|it| it.last()) + self.0.value_of_os(name) } fn values_of_os(&'a self, name: &str) -> Option<clap::OsValues<'a>> { |