diff --git a/library/std/src/sys/xous/fs.rs b/library/std/src/sys/xous/fs.rs index eff793d0d41fb..503f84246c1e4 100644 --- a/library/std/src/sys/xous/fs.rs +++ b/library/std/src/sys/xous/fs.rs @@ -3,7 +3,7 @@ use alloc::str::FromStr; use crate::ffi::OsString; use crate::fmt; use crate::hash::Hash; -use crate::io::{self, IoSlice, IoSliceMut, BorrowedCursor, SeekFrom}; +use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut, SeekFrom}; use crate::os::xous::ffi::{InvokeType, OsStrExt, Syscall, SyscallResult}; use crate::path::{Path, PathBuf}; use crate::sys::time::SystemTime; @@ -164,13 +164,11 @@ impl DirEntry { pub fn metadata(&self) -> io::Result { match self.kind { - FileType::None | FileType::Unknown => { - Err(crate::io::Error::new( - crate::io::ErrorKind::NotFound, - "File or directory does not exist, or is corrupted" - )) - } - _ => Ok(FileAttr { kind: self.kind, len: 0 }) + FileType::None | FileType::Unknown => Err(crate::io::Error::new( + crate::io::ErrorKind::NotFound, + "File or directory does not exist, or is corrupted", + )), + _ => Ok(FileAttr { kind: self.kind, len: 0 }), } } @@ -712,13 +710,11 @@ pub fn stat(p: &Path) -> io::Result { }; match kind { - FileType::None | FileType::Unknown => { - Err(crate::io::Error::new( - crate::io::ErrorKind::NotFound, - "File or directory does not exist, or is corrupted" - )) - } - _ => Ok(FileAttr { kind, len: 0 }) + FileType::None | FileType::Unknown => Err(crate::io::Error::new( + crate::io::ErrorKind::NotFound, + "File or directory does not exist, or is corrupted", + )), + _ => Ok(FileAttr { kind, len: 0 }), } } diff --git a/library/std/src/sys/xous/senres.rs b/library/std/src/sys/xous/senres.rs index b17c5459b45ad..4e18dfa21f168 100644 --- a/library/std/src/sys/xous/senres.rs +++ b/library/std/src/sys/xous/senres.rs @@ -41,10 +41,7 @@ impl<'a> Message<'a> { message_id, auto_return: true, data: unsafe { - core::slice::from_raw_parts_mut( - core::ptr::from_exposed_addr_mut::(data), - len, - ) + core::slice::from_raw_parts_mut(core::ptr::from_exposed_addr_mut::(data), len) }, }) }