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.
vexFileStatus
fs::exists
1 parent 6f2fff8 commit e0ec89eCopy full SHA for e0ec89e
library/std/src/sys/fs/vexos.rs
@@ -512,8 +512,7 @@ pub fn exists(path: &Path) -> io::Result<bool> {
512
let path = CString::new(path.as_os_str().as_encoded_bytes())
513
.map_err(|_| io::Error::new(io::ErrorKind::InvalidData, "Path contained a null byte"))?;
514
515
- let file_exists = unsafe { vex_sdk::vexFileStatus(path.as_ptr()) };
516
- if file_exists != 0 { Ok(true) } else { Ok(false) }
+ Ok(unsafe { vex_sdk::vexFileStatus(path.as_ptr()) } != 0)
517
}
518
519
pub fn readlink(_p: &Path) -> io::Result<PathBuf> {
0 commit comments