Add AsMut<Vec<T>> for Vec<T>
This commit is contained in:
parent
9b97264d81
commit
804efdabcd
1 changed files with 7 additions and 0 deletions
|
|
@ -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] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue