]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/ffi/c_str.rs
Auto merge of #87869 - thomcc:skinny-io-error, r=yaahc
[rust.git] / library / std / src / ffi / c_str.rs
index e10c6a5daf13e4216447c8a44ad1bcc75b465708..c3f024026efad027534fa69de42ec34e28b16ee9 100644 (file)
@@ -1077,7 +1077,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 impl From<NulError> for io::Error {
     /// Converts a [`NulError`] into a [`io::Error`].
     fn from(_: NulError) -> io::Error {
-        io::Error::new_const(io::ErrorKind::InvalidInput, &"data provided contains a nul byte")
+        io::const_io_error!(io::ErrorKind::InvalidInput, "data provided contains a nul byte")
     }
 }