Skip to content

Commit 7ba7622

Browse files
committed
std: Forward ExactSizeIterator::is_empty for Args, ArgsOs iterators
1 parent dd3e63a commit 7ba7622

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/libstd/env.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ impl Iterator for Args {
630630
#[stable(feature = "env", since = "1.0.0")]
631631
impl ExactSizeIterator for Args {
632632
fn len(&self) -> usize { self.inner.len() }
633+
fn is_empty(&self) -> bool { self.inner.is_empty() }
633634
}
634635

635636
#[stable(feature = "env_iterators", since = "1.11.0")]
@@ -649,6 +650,7 @@ impl Iterator for ArgsOs {
649650
#[stable(feature = "env", since = "1.0.0")]
650651
impl ExactSizeIterator for ArgsOs {
651652
fn len(&self) -> usize { self.inner.len() }
653+
fn is_empty(&self) -> bool { self.inner.is_empty() }
652654
}
653655

654656
#[stable(feature = "env_iterators", since = "1.11.0")]

src/libstd/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250
#![feature(core_float)]
251251
#![feature(core_intrinsics)]
252252
#![feature(dropck_parametricity)]
253+
#![feature(exact_size_is_empty)]
253254
#![feature(float_extras)]
254255
#![feature(float_from_str_radix)]
255256
#![feature(fn_traits)]

0 commit comments

Comments
 (0)