mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Fix clippy::single_char_pattern
This commit is contained in:
parent
682bf04bf4
commit
ed3d93b875
4 changed files with 6 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue