1
Fork 0

std: Apply rust_2024_incompatible_pat

This commit is contained in:
Eric Huss 2025-02-12 14:13:04 -08:00
parent 7dc9e05742
commit 1ba59f868a

View file

@ -183,7 +183,7 @@ impl Iterator for ReadDir {
fn next(&mut self) -> Option<io::Result<DirEntry>> { fn next(&mut self) -> Option<io::Result<DirEntry>> {
match &mut self.state { 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); let result = self.inner.dir.fd.readdir(buf, *next_read_offset);
match result { match result {
Ok(read_bytes) => { 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..]; let contents = &buf[*offset..];
const DIRENT_SIZE: usize = crate::mem::size_of::<wasi::Dirent>(); const DIRENT_SIZE: usize = crate::mem::size_of::<wasi::Dirent>();
if contents.len() >= DIRENT_SIZE { if contents.len() >= DIRENT_SIZE {