From eceaf94f1936436e33ae235ca65bf2a6d4f77da5 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 18 Feb 2020 15:32:19 +0200 Subject: More manual clippy fixes --- crates/ra_hir_expand/src/builtin_macro.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'crates/ra_hir_expand/src/builtin_macro.rs') diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs index 4adaa9b07..f2bb0bddb 100644 --- a/crates/ra_hir_expand/src/builtin_macro.rs +++ b/crates/ra_hir_expand/src/builtin_macro.rs @@ -155,14 +155,11 @@ fn compile_error_expand( tt: &tt::Subtree, ) -> Result { if tt.count() == 1 { - match &tt.token_trees[0] { - tt::TokenTree::Leaf(tt::Leaf::Literal(it)) => { - let s = it.text.as_str(); - if s.contains('"') { - return Ok(quote! { loop { #it }}); - } + if let tt::TokenTree::Leaf(tt::Leaf::Literal(it)) = &tt.token_trees[0] { + let s = it.text.as_str(); + if s.contains('"') { + return Ok(quote! { loop { #it }}); } - _ => {} }; } -- cgit v1.2.3