Skip to content

Commit 966cf33

Browse files
committed
Simplify implementation of From<Infallible> for TryFromIntError.
1 parent 1a29e82 commit 966cf33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libcore/num/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2505,8 +2505,9 @@ impl fmt::Display for TryFromIntError {
25052505

25062506
#[unstable(feature = "try_from", issue = "33417")]
25072507
impl From<Infallible> for TryFromIntError {
2508-
fn from(_: Infallible) -> TryFromIntError {
2509-
TryFromIntError(())
2508+
fn from(infallible: Infallible) -> TryFromIntError {
2509+
match infallible {
2510+
}
25102511
}
25112512
}
25122513

0 commit comments

Comments
 (0)