From e75e2ae5b6b6b1364368ceb3d4081b6508b2f001 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sun, 28 Jun 2020 04:02:03 +0300 Subject: Simlify with matches!() --- crates/ra_parser/src/grammar/type_params.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crates/ra_parser/src/grammar/type_params.rs') diff --git a/crates/ra_parser/src/grammar/type_params.rs b/crates/ra_parser/src/grammar/type_params.rs index 325d566ad..d1330d4b9 100644 --- a/crates/ra_parser/src/grammar/type_params.rs +++ b/crates/ra_parser/src/grammar/type_params.rs @@ -169,10 +169,7 @@ fn is_where_predicate(p: &mut Parser) -> bool { } fn is_where_clause_end(p: &mut Parser) -> bool { - match p.current() { - T!['{'] | T![;] | T![=] => true, - _ => false, - } + matches!(p.current(), T!['{'] | T![;] | T![=]) } fn where_predicate(p: &mut Parser) { -- cgit v1.2.3