Replace unreachable! with empty enum match
This commit is contained in:
parent
e664749d61
commit
456efde245
|
@ -87,8 +87,8 @@ impl From<&'_ str> for Error {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<std::convert::Infallible> for Error {
|
impl From<std::convert::Infallible> for Error {
|
||||||
fn from(_: std::convert::Infallible) -> Self {
|
fn from(x: std::convert::Infallible) -> Self {
|
||||||
unreachable!()
|
match x {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue