Add AsMut<Vec<T>> for Vec<T>

This commit is contained in:
Ulrik Sverdrup 2015-09-25 19:54:15 +02:00
parent 9b97264d81
commit 804efdabcd

View file

@ -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] {