From aeb949753e80ca741df89612e446a77d1c16e3ab Mon Sep 17 00:00:00 2001 From: yanchith Date: Sat, 16 Jul 2022 11:58:26 +0200 Subject: [PATCH] Borrow Vec as [T] --- library/alloc/src/slice.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index 4a9cecd9b4e1a..63d4d94529008 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -836,14 +836,14 @@ impl> Join<&[T]> for [V] { //////////////////////////////////////////////////////////////////////////////// #[stable(feature = "rust1", since = "1.0.0")] -impl Borrow<[T]> for Vec { +impl Borrow<[T]> for Vec { fn borrow(&self) -> &[T] { &self[..] } } #[stable(feature = "rust1", since = "1.0.0")] -impl BorrowMut<[T]> for Vec { +impl BorrowMut<[T]> for Vec { fn borrow_mut(&mut self) -> &mut [T] { &mut self[..] }