mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-02 16:47:26 +00:00
Fix clippy::or_fun_call
This commit is contained in:
parent
40424d4222
commit
b28ca32db2
12 changed files with 29 additions and 26 deletions
|
@ -255,7 +255,7 @@ where
|
|||
let first_non_space = str
|
||||
.bytes()
|
||||
.position(|b| b != b' ' && b != b'\t' && b != b'\n' && b != b'\r')
|
||||
.unwrap_or(str.len());
|
||||
.unwrap_or_else(|| str.len());
|
||||
*chars = str[first_non_space..].chars()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue