diff options
Diffstat (limited to 'crates/syntax/src/ast')
-rw-r--r-- | crates/syntax/src/ast/node_ext.rs | 2 | ||||
-rw-r--r-- | crates/syntax/src/ast/token_ext.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs index aa3a4b606..820af2d20 100644 --- a/crates/syntax/src/ast/node_ext.rs +++ b/crates/syntax/src/ast/node_ext.rs | |||
@@ -55,7 +55,7 @@ impl ast::Attr { | |||
55 | let key = self.simple_name()?; | 55 | let key = self.simple_name()?; |
56 | let value_token = lit.syntax().first_token()?; | 56 | let value_token = lit.syntax().first_token()?; |
57 | 57 | ||
58 | let value: SmolStr = ast::String::cast(value_token.clone())?.value()?.into(); | 58 | let value: SmolStr = ast::String::cast(value_token)?.value()?.into(); |
59 | 59 | ||
60 | Some((key, value)) | 60 | Some((key, value)) |
61 | } | 61 | } |
diff --git a/crates/syntax/src/ast/token_ext.rs b/crates/syntax/src/ast/token_ext.rs index 52b7285dd..5e9620a40 100644 --- a/crates/syntax/src/ast/token_ext.rs +++ b/crates/syntax/src/ast/token_ext.rs | |||
@@ -599,7 +599,7 @@ impl ast::IntNumber { | |||
599 | text = &text[radix.prefix_len()..]; | 599 | text = &text[radix.prefix_len()..]; |
600 | 600 | ||
601 | let buf; | 601 | let buf; |
602 | if text.contains("_") { | 602 | if text.contains('_') { |
603 | buf = text.replace('_', ""); | 603 | buf = text.replace('_', ""); |
604 | text = buf.as_str(); | 604 | text = buf.as_str(); |
605 | }; | 605 | }; |