Skip to content

Commit

Permalink
Simplify implementation of From<Infallible> for TryFromIntError.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmycuadra committed Sep 29, 2017
1 parent 1a29e82 commit 966cf33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2505,8 +2505,9 @@ impl fmt::Display for TryFromIntError {

#[unstable(feature = "try_from", issue = "33417")]
impl From<Infallible> for TryFromIntError {
fn from(_: Infallible) -> TryFromIntError {
TryFromIntError(())
fn from(infallible: Infallible) -> TryFromIntError {
match infallible {
}
}
}

Expand Down

0 comments on commit 966cf33

Please sign in to comment.