add Infallible
, for errors which never occur
This commit is contained in:
parent
aee2f2def0
commit
c06982b7ac
|
@ -5,3 +5,11 @@ pub enum Error {
|
||||||
OutOfBounds(usize),
|
OutOfBounds(usize),
|
||||||
BadBlockGroupCount(u32, u32),
|
BadBlockGroupCount(u32, u32),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<Infallible> for Error {
|
||||||
|
fn from(_: Infallible) -> Error {
|
||||||
|
unreachable!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub enum Infallible {}
|
||||||
|
|
Reference in a new issue