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 4ba88d3 commit fb7e6a5Copy full SHA for fb7e6a5
src/lib.rs
@@ -396,10 +396,7 @@ where
396
I: SliceIndex<[T]>,
397
T: 'a,
398
{
399
- Volatile {
400
- reference: self.reference.index(index),
401
- access: self.access,
402
- }
+ self.map(|slice| slice.index(index))
403
}
404
405
pub fn index_mut<'a, I>(&'a mut self, index: I) -> Volatile<&mut I::Output, A>
@@ -408,10 +405,7 @@ where
408
R: DerefMut,
409
406
410
407
411
412
- reference: self.reference.index_mut(index),
413
414
+ self.map_mut(|slice| slice.index_mut(index))
415
416
417
/// Copies all elements from `self` into `dst`, using a volatile memcpy.
0 commit comments