Skip to content

Commit

Permalink
Updated the match with the matches macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Polkaverse committed Dec 23, 2020
1 parent 57b5f8c commit c625d31
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,7 @@ pub enum TyKind<'tcx> {
impl TyKind<'tcx> {
#[inline]
pub fn is_primitive(&self) -> bool {
match self {
Bool | Char | Int(_) | Uint(_) | Float(_) => true,
_ => false,
}
matches!(self, Bool | Char | Int(_) | Uint(_) | Float(_))
}
}

Expand Down

0 comments on commit c625d31

Please sign in to comment.