Skip to content

Commit 9bc9f95

Browse files
committed
Fix as_slice/as_mut_slice
1 parent 408a5f1 commit 9bc9f95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ where
610610
/// assert_eq!(dst, [1, 2]);
611611
/// ```
612612
pub fn as_slice(&self) -> Volatile<&[T], A> {
613-
self.map(|array| &*array)
613+
self.map(|array| &array[..])
614614
}
615615

616616
/// Converts a mutable array reference to a mutable slice.
@@ -639,7 +639,7 @@ where
639639
where
640640
R: DerefMut,
641641
{
642-
self.map_mut(|array| &mut *array)
642+
self.map_mut(|array| &mut array[..])
643643
}
644644
}
645645

0 commit comments

Comments
 (0)