We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb7e6a5 commit a78fd04Copy full SHA for a78fd04
src/lib.rs
@@ -544,10 +544,7 @@ where
544
/// assert_eq!(dst, [1, 2]);
545
/// ```
546
pub fn as_slice(&self) -> Volatile<&[T], A> {
547
- Volatile {
548
- reference: &*self.reference,
549
- access: self.access,
550
- }
+ self.map(|array| &*array)
551
}
552
553
/// Converts a mutable array reference to a mutable slice.
@@ -576,10 +573,7 @@ where
576
573
where
577
574
R: DerefMut,
578
575
{
579
580
- reference: &mut *self.reference,
581
582
+ self.map_mut(|array| &mut *array)
583
584
585
0 commit comments