Skip to content

Commit 4d3fc48

Browse files
committed
add From<Utf8Error> to DecodeError
1 parent 49a334b commit 4d3fc48

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/coding.rs

+6
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ impl std::fmt::Display for DecodeError {
6969
}
7070
}
7171

72+
impl From<std::str::Utf8Error> for DecodeError {
73+
fn from(value: std::str::Utf8Error) -> Self {
74+
Self::Utf8(value)
75+
}
76+
}
77+
7278
impl From<std::io::Error> for DecodeError {
7379
fn from(value: std::io::Error) -> Self {
7480
Self::Io(value)

0 commit comments

Comments
 (0)