Skip to content

Commit

Permalink
Add AsMut<Vec<T>> for Vec<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
bluss committed Sep 25, 2015
1 parent 9b97264 commit 804efda
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libcollections/vec.rs
Expand Up @@ -1352,6 +1352,13 @@ impl<T> AsRef<Vec<T>> for Vec<T> {
}
}

#[stable(feature = "vec_as_mut", since = "1.5.0")]
impl<T> AsMut<Vec<T>> for Vec<T> {
fn as_mut(&mut self) -> &mut Vec<T> {
self
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T> AsRef<[T]> for Vec<T> {
fn as_ref(&self) -> &[T] {
Expand Down

0 comments on commit 804efda

Please sign in to comment.