about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorUlrik Sverdrup <bluss@users.noreply.github.com>2016-12-03 21:59:00 +0100
committerUlrik Sverdrup <bluss@users.noreply.github.com>2016-12-04 15:46:36 +0100
commit7ba762253ccf487ae61b2be45a9edfdf19b79cc0 (patch)
tree9acbd507667e816ea90517aab66a1534c8694c9b /src/libstd
parentdd3e63aea5680b8c55a165d51691b426b86d657a (diff)
downloadrust-7ba762253ccf487ae61b2be45a9edfdf19b79cc0.tar.gz
rust-7ba762253ccf487ae61b2be45a9edfdf19b79cc0.zip
std: Forward ExactSizeIterator::is_empty for Args, ArgsOs iterators
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/env.rs2
-rw-r--r--src/libstd/lib.rs1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs
index baa2b5d2846..ee6a907f616 100644
--- a/src/libstd/env.rs
+++ b/src/libstd/env.rs
@@ -630,6 +630,7 @@ impl Iterator for Args {
 #[stable(feature = "env", since = "1.0.0")]
 impl ExactSizeIterator for Args {
     fn len(&self) -> usize { self.inner.len() }
+    fn is_empty(&self) -> bool { self.inner.is_empty() }
 }
 
 #[stable(feature = "env_iterators", since = "1.11.0")]
@@ -649,6 +650,7 @@ impl Iterator for ArgsOs {
 #[stable(feature = "env", since = "1.0.0")]
 impl ExactSizeIterator for ArgsOs {
     fn len(&self) -> usize { self.inner.len() }
+    fn is_empty(&self) -> bool { self.inner.is_empty() }
 }
 
 #[stable(feature = "env_iterators", since = "1.11.0")]
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 8132b139260..1f40d3fd1d3 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -250,6 +250,7 @@
 #![feature(core_float)]
 #![feature(core_intrinsics)]
 #![feature(dropck_parametricity)]
+#![feature(exact_size_is_empty)]
 #![feature(float_extras)]
 #![feature(float_from_str_radix)]
 #![feature(fn_traits)]