From 356c69e508fd25a9f0ea2d27bf80ae1d9a8d88f4 Mon Sep 17 00:00:00 2001 From: Tobias Bucher Date: Fri, 22 Jun 2018 16:07:38 +0200 Subject: [PATCH] fix(OsValues): Add `ExactSizeIterator` implementation It seems like an oversight that this was omitted. --- src/args/arg_matches.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/args/arg_matches.rs b/src/args/arg_matches.rs index 5617b226462..7ac112877ec 100644 --- a/src/args/arg_matches.rs +++ b/src/args/arg_matches.rs @@ -855,6 +855,8 @@ impl<'a> DoubleEndedIterator for OsValues<'a> { fn next_back(&mut self) -> Option<&'a OsStr> { self.iter.next_back() } } +impl<'a> ExactSizeIterator for OsValues<'a> {} + /// Creates an empty iterator. impl<'a> Default for OsValues<'a> { fn default() -> Self {