Skip to content

Commit fd63072

Browse files
bonziniBennoLossin
authored andcommitted
examples: converting from Infallible is unreachable
Use the same implementation for both examples/error.rs and examples/pthread_mutex.rs. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 120a4ef commit fd63072

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use std::alloc::AllocError;
77
pub struct Error;
88

99
impl From<Infallible> for Error {
10-
fn from(_: Infallible) -> Self {
11-
Self
10+
fn from(e: Infallible) -> Self {
11+
match e {}
1212
}
1313
}
1414

0 commit comments

Comments
 (0)