diff options
| author | yanchith <yanchi.toth@gmail.com> | 2022-07-16 11:58:26 +0200 |
|---|---|---|
| committer | yanchith <yanchi.toth@gmail.com> | 2022-07-16 11:58:26 +0200 |
| commit | aeb949753e80ca741df89612e446a77d1c16e3ab (patch) | |
| tree | 74cd2eab29a98e6d6205691327e3a97126f8cbea | |
| parent | e6c43cf8b98e4837bbee1cab225621001a3f2230 (diff) | |
| download | rust-aeb949753e80ca741df89612e446a77d1c16e3ab.tar.gz rust-aeb949753e80ca741df89612e446a77d1c16e3ab.zip | |
Borrow Vec<T, A> as [T]
| -rw-r--r-- | library/alloc/src/slice.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index 4a9cecd9b4e..63d4d945290 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -836,14 +836,14 @@ impl<T: Clone, V: Borrow<[T]>> Join<&[T]> for [V] { //////////////////////////////////////////////////////////////////////////////// #[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[..] } |
