Fix clippy::single_char_pattern

This commit is contained in:
Alan Du 2019-06-04 02:38:13 -04:00
parent 682bf04bf4
commit ed3d93b875
4 changed files with 6 additions and 9 deletions

View file

@ -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