about summary refs log tree commit diff
path: root/library/std/src/sys/pal/solid/fs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/pal/solid/fs.rs')
-rw-r--r--library/std/src/sys/pal/solid/fs.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/library/std/src/sys/pal/solid/fs.rs b/library/std/src/sys/pal/solid/fs.rs
index 776a96ff3b7..04dd10ad806 100644
--- a/library/std/src/sys/pal/solid/fs.rs
+++ b/library/std/src/sys/pal/solid/fs.rs
@@ -303,7 +303,7 @@ fn cstr(path: &Path) -> io::Result<CString> {
 
     if !path.starts_with(br"\") {
         // Relative paths aren't supported
-        return Err(crate::io::const_io_error!(
+        return Err(crate::io::const_error!(
             crate::io::ErrorKind::Unsupported,
             "relative path is not supported on this platform",
         ));
@@ -314,10 +314,7 @@ fn cstr(path: &Path) -> io::Result<CString> {
     let wrapped_path = [SAFE_PREFIX, &path, &[0]].concat();
 
     CString::from_vec_with_nul(wrapped_path).map_err(|_| {
-        crate::io::const_io_error!(
-            io::ErrorKind::InvalidInput,
-            "path provided contains a nul byte",
-        )
+        crate::io::const_error!(io::ErrorKind::InvalidInput, "path provided contains a nul byte",)
     })
 }
 
@@ -512,7 +509,7 @@ impl fmt::Debug for File {
 
 pub fn unlink(p: &Path) -> io::Result<()> {
     if stat(p)?.file_type().is_dir() {
-        Err(io::const_io_error!(io::ErrorKind::IsADirectory, "is a directory"))
+        Err(io::const_error!(io::ErrorKind::IsADirectory, "is a directory"))
     } else {
         error::SolidError::err_if_negative(unsafe { abi::SOLID_FS_Unlink(cstr(p)?.as_ptr()) })
             .map_err(|e| e.as_io_error())?;
@@ -542,7 +539,7 @@ pub fn rmdir(p: &Path) -> io::Result<()> {
             .map_err(|e| e.as_io_error())?;
         Ok(())
     } else {
-        Err(io::const_io_error!(io::ErrorKind::NotADirectory, "not a directory"))
+        Err(io::const_error!(io::ErrorKind::NotADirectory, "not a directory"))
     }
 }
 
@@ -570,7 +567,7 @@ pub fn remove_dir_all(path: &Path) -> io::Result<()> {
 pub fn readlink(p: &Path) -> io::Result<PathBuf> {
     // This target doesn't support symlinks
     stat(p)?;
-    Err(io::const_io_error!(io::ErrorKind::InvalidInput, "not a symbolic link"))
+    Err(io::const_error!(io::ErrorKind::InvalidInput, "not a symbolic link"))
 }
 
 pub fn symlink(_original: &Path, _link: &Path) -> io::Result<()> {