diff options
author | Alan Du <[email protected]> | 2018-10-16 16:51:58 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2018-10-18 00:42:23 +0100 |
commit | d493a4476c2059924d032fbf01dda091601f9667 (patch) | |
tree | 74c1249cba67c8c9824e618fcdea53b97b571a7b /crates/ra_syntax/src/grammar/items | |
parent | 5db663d61fb8b006e3b84ef3bcc9cddbe94e5f49 (diff) |
clippy: Use if lets and remove redundant returns
Diffstat (limited to 'crates/ra_syntax/src/grammar/items')
-rw-r--r-- | crates/ra_syntax/src/grammar/items/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/grammar/items/mod.rs b/crates/ra_syntax/src/grammar/items/mod.rs index dc4742bce..06c6b5e6e 100644 --- a/crates/ra_syntax/src/grammar/items/mod.rs +++ b/crates/ra_syntax/src/grammar/items/mod.rs | |||
@@ -352,7 +352,7 @@ fn macro_call(p: &mut Parser) -> BlockLike { | |||
352 | pub(super) fn macro_call_after_excl(p: &mut Parser) -> BlockLike { | 352 | pub(super) fn macro_call_after_excl(p: &mut Parser) -> BlockLike { |
353 | p.expect(EXCL); | 353 | p.expect(EXCL); |
354 | p.eat(IDENT); | 354 | p.eat(IDENT); |
355 | let flavor = match p.current() { | 355 | match p.current() { |
356 | L_CURLY => { | 356 | L_CURLY => { |
357 | token_tree(p); | 357 | token_tree(p); |
358 | BlockLike::Block | 358 | BlockLike::Block |
@@ -365,9 +365,7 @@ pub(super) fn macro_call_after_excl(p: &mut Parser) -> BlockLike { | |||
365 | p.error("expected `{`, `[`, `(`"); | 365 | p.error("expected `{`, `[`, `(`"); |
366 | BlockLike::NotBlock | 366 | BlockLike::NotBlock |
367 | } | 367 | } |
368 | }; | 368 | } |
369 | |||
370 | flavor | ||
371 | } | 369 | } |
372 | 370 | ||
373 | pub(crate) fn token_tree(p: &mut Parser) { | 371 | pub(crate) fn token_tree(p: &mut Parser) { |