Fix &&str and trailing commas in io::const_error!

This commit is contained in:
Thalia Archibald
2025-02-10 16:34:13 -08:00
parent 7edd034a1f
commit 9e390b2995
16 changed files with 75 additions and 91 deletions

View File

@@ -3575,7 +3575,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_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)
}