File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,20 @@ impl From<NulError> for io::Error {
455455 }
456456}
457457
458+ #[ unstable( feature = "frombyteswithnulerror_impls" , reason = "recently added" , issue = "39925" ) ]
459+ impl Error for FromBytesWithNulError {
460+ fn description ( & self ) -> & str {
461+ "data provided is not null terminated or contains an interior nul byte"
462+ }
463+ }
464+
465+ #[ unstable( feature = "frombyteswithnulerror_impls" , reason = "recently added" , issue = "39925" ) ]
466+ impl fmt:: Display for FromBytesWithNulError {
467+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
468+ self . description ( ) . fmt ( f)
469+ }
470+ }
471+
458472impl IntoStringError {
459473 /// Consumes this error, returning original `CString` which generated the
460474 /// error.
You can’t perform that action at this time.
0 commit comments