aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-28 23:37:25 +0100
committerGitHub <[email protected]>2020-06-28 23:37:25 +0100
commitca31b1d63ae91a69f1ce9c0b075403834ba19f38 (patch)
treedf719c1ccd7cbd174b79ca50ffd0052731d1ea86 /crates/ra_hir_ty/src/lib.rs
parent11f31ae4c3a38831609e4591e751ce10c4e38daf (diff)
parent36128c170d9d938cfcc52bc851aaed1fab6a2ad9 (diff)
Merge #5105
5105: Simlify with matches!() r=matklad a=Veetaha Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src/lib.rs')
-rw-r--r--crates/ra_hir_ty/src/lib.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs
index 414158139..c9513b752 100644
--- a/crates/ra_hir_ty/src/lib.rs
+++ b/crates/ra_hir_ty/src/lib.rs
@@ -620,17 +620,11 @@ pub enum GenericPredicate {
620 620
621impl GenericPredicate { 621impl GenericPredicate {
622 pub fn is_error(&self) -> bool { 622 pub fn is_error(&self) -> bool {
623 match self { 623 matches!(self, GenericPredicate::Error)
624 GenericPredicate::Error => true,
625 _ => false,
626 }
627 } 624 }
628 625
629 pub fn is_implemented(&self) -> bool { 626 pub fn is_implemented(&self) -> bool {
630 match self { 627 matches!(self, GenericPredicate::Implemented(_))
631 GenericPredicate::Implemented(_) => true,
632 _ => false,
633 }
634 } 628 }
635 629
636 pub fn trait_ref(&self, db: &dyn HirDatabase) -> Option<TraitRef> { 630 pub fn trait_ref(&self, db: &dyn HirDatabase) -> Option<TraitRef> {