Skip to content

Commit 999ffea

Browse files
committed
Reverted From<NulError> conversion to result in io::Error kind InvalidInput
The cases where the conversion is used in the standard library clearly fall under "invalid parameter supplied for the operation".
1 parent c7212ea commit 999ffea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/ffi/c_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl fmt::Display for NulError {
238238
#[stable(feature = "rust1", since = "1.0.0")]
239239
impl From<NulError> for io::Error {
240240
fn from(_: NulError) -> io::Error {
241-
io::Error::new(io::ErrorKind::InvalidOutput,
241+
io::Error::new(io::ErrorKind::InvalidInput,
242242
"data provided contains a nul byte")
243243
}
244244
}

0 commit comments

Comments
 (0)