mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-25 21:37:39 +00:00
a few clippy fixes
This commit is contained in:
parent
e52d47a3b8
commit
35de195c41
5 changed files with 9 additions and 5 deletions
|
|
@ -101,7 +101,7 @@ pub /*(meh)*/ fn replace_range(mut text: String, range: TextRange, replace_with:
|
|||
}
|
||||
|
||||
fn is_balanced(tokens: &[Token]) -> bool {
|
||||
if tokens.len() == 0
|
||||
if tokens.is_empty()
|
||||
|| tokens.first().unwrap().kind != L_CURLY
|
||||
|| tokens.last().unwrap().kind != R_CURLY {
|
||||
return false
|
||||
|
|
@ -153,7 +153,7 @@ pub /*(meh)*/ fn replace_range(mut text: String, range: TextRange, replace_with:
|
|||
}
|
||||
|
||||
fn is_balanced(tokens: &[Token]) -> bool {
|
||||
if tokens.len() == 0
|
||||
if tokens.is_empty()
|
||||
|| tokens.first().unwrap().kind != L_CURLY
|
||||
|| tokens.last().unwrap().kind != R_CURLY {
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue