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 b07ef19 commit ba50a09Copy full SHA for ba50a09
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