std: update internal uses of io::const_error!

This commit is contained in:
joboet
2024-11-25 13:49:25 +01:00
parent d39afacbdf
commit c14d137bfc
53 changed files with 213 additions and 246 deletions

View File

@@ -3580,7 +3580,7 @@ impl Error for StripPrefixError {
pub fn absolute<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
let path = path.as_ref();
if path.as_os_str().is_empty() {
Err(io::const_io_error!(io::ErrorKind::InvalidInput, "cannot make an empty path absolute",))
Err(io::const_error!(io::ErrorKind::InvalidInput, "cannot make an empty path absolute",))
} else {
sys::path::absolute(path)
}