Commit 173a5a8
committed
Replace match statement with if
rustc doesn’t yet realize that enum variants without explicit
discriminators are constant enough to be used as patterns in a match
statement (rust-lang/rust#23898).
This happens to be what #[derive(FromPrimitive)] does, anyway.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>1 parent b8ecbb2 commit 173a5a8
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments