aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2019-06-04 07:38:13 +0100
committerAlan Du <[email protected]>2019-06-04 23:05:07 +0100
commited3d93b875f25da6f81b8a107a8c200311240627 (patch)
tree77da821f9b00fc68e22f93aa5dba9989c8fcf0a7 /crates/ra_syntax/src
parent682bf04bf4a84e9c309b4ad2079ff08a3b09770b (diff)
Fix clippy::single_char_pattern
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast/extensions.rs2
1 files changed, 1 insertions, 1 deletions
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 {
78 if attr.kind() == IDENT { 78 if attr.kind() == IDENT {
79 let key = attr.as_token()?.text().clone(); 79 let key = attr.as_token()?.text().clone();
80 let val_node = tt_node.children_with_tokens().find(|t| t.kind() == STRING)?; 80 let val_node = tt_node.children_with_tokens().find(|t| t.kind() == STRING)?;
81 let val = val_node.as_token()?.text().trim_start_matches("\"").trim_end_matches("\""); 81 let val = val_node.as_token()?.text().trim_start_matches('"').trim_end_matches('"');
82 Some((key, SmolStr::new(val))) 82 Some((key, SmolStr::new(val)))
83 } else { 83 } else {
84 None 84 None