Skip to content

Commit f8bf94a

Browse files
committed
Use matches!
1 parent b60970f commit f8bf94a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/ra_hir_ty/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,7 @@ impl Ty {
731731
}
732732

733733
pub fn is_never(&self) -> bool {
734-
match self {
735-
Ty::Apply(ApplicationTy { ctor: TypeCtor::Never, .. }) => true,
736-
_ => false,
737-
}
734+
matches!(self, Ty::Apply(ApplicationTy { ctor: TypeCtor::Never, .. }))
738735
}
739736

740737
/// If this is a `dyn Trait` type, this returns the `Trait` part.

0 commit comments

Comments
 (0)