From ed3d93b875f25da6f81b8a107a8c200311240627 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Tue, 4 Jun 2019 02:38:13 -0400 Subject: Fix clippy::single_char_pattern --- crates/ra_syntax/src/ast/extensions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/ast') diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs index e4c99784c..930b2d9fa 100644 --- a/crates/ra_syntax/src/ast/extensions.rs +++ b/crates/ra_syntax/src/ast/extensions.rs @@ -78,7 +78,7 @@ impl ast::Attr { if attr.kind() == IDENT { let key = attr.as_token()?.text().clone(); let val_node = tt_node.children_with_tokens().find(|t| t.kind() == STRING)?; - let val = val_node.as_token()?.text().trim_start_matches("\"").trim_end_matches("\""); + let val = val_node.as_token()?.text().trim_start_matches('"').trim_end_matches('"'); Some((key, SmolStr::new(val))) } else { None -- cgit v1.2.3