diff --git a/library/std/src/sys/pal/wasi/fs.rs b/library/std/src/sys/pal/wasi/fs.rs index 7705e7f6b88..faf3edd5da6 100644 --- a/library/std/src/sys/pal/wasi/fs.rs +++ b/library/std/src/sys/pal/wasi/fs.rs @@ -183,7 +183,7 @@ impl Iterator for ReadDir { fn next(&mut self) -> Option> { match &mut self.state { - ReadDirState::FillBuffer { next_read_offset, ref mut buf } => { + ReadDirState::FillBuffer { next_read_offset, buf } => { let result = self.inner.dir.fd.readdir(buf, *next_read_offset); match result { Ok(read_bytes) => { @@ -207,7 +207,7 @@ impl Iterator for ReadDir { } } } - ReadDirState::ProcessEntry { ref mut buf, next_read_offset, offset } => { + ReadDirState::ProcessEntry { buf, next_read_offset, offset } => { let contents = &buf[*offset..]; const DIRENT_SIZE: usize = crate::mem::size_of::(); if contents.len() >= DIRENT_SIZE {