Skip to content

Commit 82314ff

Browse files
committed
Fix another &mut * issue.
1 parent 517f61c commit 82314ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/backend/linux_raw/param/auxv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ impl Iterator for AuxFile {
573573
let mut buf = [0_u8; size_of::<Self::Item>()];
574574
let mut slice = &mut buf[..];
575575
while !slice.is_empty() {
576-
match crate::io::read(&self.0, slice) {
576+
match crate::io::read(&self.0, &mut *slice) {
577577
Ok(0) => panic!("unexpected end of auxv file"),
578578
Ok(n) => slice = &mut slice[n..],
579579
Err(crate::io::Errno::INTR) => continue,

src/buffer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use core::slice;
99

1010
/// A memory buffer that may be uninitialized.
1111
///
12-
/// If you see errors like "move occurs because `x.y` has type `&mut [u8]`,
13-
/// which does not implement the `Copy` trait", replace `x.y` with `&mut *x.y`.
12+
/// If you see errors like "move occurs because `x` has type `&mut [u8]`,
13+
/// which does not implement the `Copy` trait", replace `x` with `&mut *x`.
1414
pub trait Buffer<T>: private::Sealed<T> {}
1515

1616
// Implement `Buffer` for all the types that implement `Sealed`.

0 commit comments

Comments
 (0)