Skip to content

Commit fb5b0c2

Browse files
committed
fix: impl From<Infallible> for Errno
1 parent 7bee4a4 commit fb5b0c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/errno.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! System error numbers.
22
3+
use core::convert::Infallible;
4+
35
use num_enum::{IntoPrimitive, TryFromPrimitive};
46
use thiserror::Error;
57

@@ -669,6 +671,12 @@ pub enum Errno {
669671
Hwpoison = 133,
670672
}
671673

674+
impl From<Infallible> for Errno {
675+
fn from(value: Infallible) -> Self {
676+
match value {}
677+
}
678+
}
679+
672680
/// Returns the pointer to `errno`.
673681
#[cfg(all(
674682
not(any(feature = "common-os", feature = "nostd")),

0 commit comments

Comments
 (0)