Skip to content

Commit

Permalink
Don't use an if guard to check equality with a constant
Browse files Browse the repository at this point in the history
Match on it directly instead
  • Loading branch information
LingMan authored Sep 22, 2020
1 parent e0bc267 commit c078905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_attr/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ where
.emit();
};
match issue.parse() {
Ok(num) if num == 0 => {
Ok(0) => {
emit_diag(
"`issue` must not be \"0\", \
use \"none\" instead",
Expand Down

0 comments on commit c078905

Please sign in to comment.