diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-31 10:15:35 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-31 15:49:11 -0700 |
| commit | 6d2c640cf00aad6345bd93b0b64c8b3d3d2fcf50 (patch) | |
| tree | bd5aad8208dbc01ab2834d2a1e0444444ce18959 /src/libcore | |
| parent | 5e0bda0448283c3045c1e96b99e90ebbc3746e12 (diff) | |
| parent | df65f59fe9dd856c96a383c01067a176fee0dbb6 (diff) | |
| download | rust-6d2c640cf00aad6345bd93b0b64c8b3d3d2fcf50.tar.gz rust-6d2c640cf00aad6345bd93b0b64c8b3d3d2fcf50.zip | |
rollup merge of #23886: demelev/remove_as_slice_usage
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 44327a822a3..7e6789c3da1 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -624,7 +624,7 @@ pub trait Iterator { /// let a = [1, 2, 3, 4, 5]; /// let mut it = a.iter(); /// assert!(it.any(|x| *x == 3)); - /// assert_eq!(it.as_slice(), [4, 5]); + /// assert_eq!(&it[..], [4, 5]); /// /// ``` #[inline] @@ -648,7 +648,7 @@ pub trait Iterator { /// let a = [1, 2, 3, 4, 5]; /// let mut it = a.iter(); /// assert_eq!(it.find(|&x| *x == 3).unwrap(), &3); - /// assert_eq!(it.as_slice(), [4, 5]); + /// assert_eq!(&it[..], [4, 5]); #[inline] #[stable(feature = "rust1", since = "1.0.0")] fn find<P>(&mut self, mut predicate: P) -> Option<Self::Item> where @@ -672,7 +672,7 @@ pub trait Iterator { /// let a = [1, 2, 3, 4, 5]; /// let mut it = a.iter(); /// assert_eq!(it.position(|x| *x == 3).unwrap(), 2); - /// assert_eq!(it.as_slice(), [4, 5]); + /// assert_eq!(&it[..], [4, 5]); #[inline] #[stable(feature = "rust1", since = "1.0.0")] fn position<P>(&mut self, mut predicate: P) -> Option<usize> where @@ -702,7 +702,7 @@ pub trait Iterator { /// let a = [1, 2, 2, 4, 5]; /// let mut it = a.iter(); /// assert_eq!(it.rposition(|x| *x == 2).unwrap(), 2); - /// assert_eq!(it.as_slice(), [1, 2]); + /// assert_eq!(&it[..], [1, 2]); #[inline] #[stable(feature = "rust1", since = "1.0.0")] fn rposition<P>(&mut self, mut predicate: P) -> Option<usize> where |
