Borrow Vec<T, A> as [T]
This commit is contained in:
parent
e6c43cf8b9
commit
aeb949753e
@ -836,14 +836,14 @@ fn join(slice: &Self, sep: &[T]) -> Vec<T> {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T> Borrow<[T]> for Vec<T> {
|
||||
impl<T, A: Allocator> Borrow<[T]> for Vec<T, A> {
|
||||
fn borrow(&self) -> &[T] {
|
||||
&self[..]
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T> BorrowMut<[T]> for Vec<T> {
|
||||
impl<T, A: Allocator> BorrowMut<[T]> for Vec<T, A> {
|
||||
fn borrow_mut(&mut self) -> &mut [T] {
|
||||
&mut self[..]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user