diff options
| author | CAD97 <cad97@cad97.com> | 2020-05-25 15:16:31 -0400 |
|---|---|---|
| committer | CAD97 <cad97@cad97.com> | 2020-05-25 15:17:28 -0400 |
| commit | 91f52a51a23f8c5e8c82c49bbf3ab1bb781d3b02 (patch) | |
| tree | 416dd7f08445a2f70debe584d61273ca464bd602 | |
| parent | a0f06d11ae7fe29c8e263e2a5d8cd41b372f0283 (diff) | |
| download | rust-91f52a51a23f8c5e8c82c49bbf3ab1bb781d3b02.tar.gz rust-91f52a51a23f8c5e8c82c49bbf3ab1bb781d3b02.zip | |
impl AsRef<[T]> for vec::IntoIter<T>
| -rw-r--r-- | src/liballoc/vec.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index d26cd77aae4..9e887cf446e 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -2603,6 +2603,13 @@ impl<T> IntoIter<T> { } } +#[stable(feature = "vec_intoiter_as_ref", since = "1.46.0")] +impl<T> AsRef<[T]> for IntoIter<T> { + fn as_ref(&self) -> &[T] { + self.as_slice() + } +} + #[stable(feature = "rust1", since = "1.0.0")] unsafe impl<T: Send> Send for IntoIter<T> {} #[stable(feature = "rust1", since = "1.0.0")] |
