about summary refs log tree commit diff
path: root/src/libstd/env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/env.rs')
-rw-r--r--src/libstd/env.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs
index ea18838211f..93dc3efe2c4 100644
--- a/src/libstd/env.rs
+++ b/src/libstd/env.rs
@@ -488,12 +488,20 @@ impl Iterator for Args {
     fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() }
 }
 
+impl ExactSizeIterator for Args {
+    fn len(&self) -> usize { self.inner.len() }
+}
+
 impl Iterator for ArgsOs {
     type Item = OsString;
     fn next(&mut self) -> Option<OsString> { self.inner.next() }
     fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() }
 }
 
+impl ExactSizeIterator for ArgsOs {
+    fn len(&self) -> usize { self.inner.len() }
+}
+
 /// Returns the page size of the current architecture in bytes.
 pub fn page_size() -> usize {
     os_imp::page_size()