Skip to content

Commit

Permalink
impl AsRef<[T]> for vec::IntoIter<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
CAD97 committed May 25, 2020
1 parent a0f06d1 commit 91f52a5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 91f52a5

Please sign in to comment.