diff options
Diffstat (limited to 'library/std/src/sys/solid/os.rs')
| -rw-r--r-- | library/std/src/sys/solid/os.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/library/std/src/sys/solid/os.rs b/library/std/src/sys/solid/os.rs index 82542d81e67..22239e1fa8e 100644 --- a/library/std/src/sys/solid/os.rs +++ b/library/std/src/sys/solid/os.rs @@ -173,11 +173,7 @@ pub fn unsetenv(n: &OsStr) -> io::Result<()> { /// In kmclib, `setenv` and `unsetenv` don't always set `errno`, so this /// function just returns a generic error. fn cvt_env(t: c_int) -> io::Result<c_int> { - if t == -1 { - Err(io::Error::new_const(io::ErrorKind::Uncategorized, &"failure")) - } else { - Ok(t) - } + if t == -1 { Err(io::const_io_error!(io::ErrorKind::Uncategorized, "failure")) } else { Ok(t) } } pub fn temp_dir() -> PathBuf { |
