add Infallible, for errors which never occur

This commit is contained in:
Szymon Walter 2018-03-19 13:28:18 +01:00
parent aee2f2def0
commit c06982b7ac

View file

@ -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 {}