mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-22 18:12:55 +00:00
remove unnecessary lazy evaluations
This commit is contained in:
parent
7530d76f00
commit
cc80c5bd07
31 changed files with 50 additions and 51 deletions
|
@ -205,7 +205,7 @@ fn extend_single_word_in_comment_or_string(
|
|||
}
|
||||
|
||||
let start_idx = before.rfind(non_word_char)? as u32;
|
||||
let end_idx = after.find(non_word_char).unwrap_or_else(|| after.len()) as u32;
|
||||
let end_idx = after.find(non_word_char).unwrap_or(after.len()) as u32;
|
||||
|
||||
let from: TextSize = (start_idx + 1).into();
|
||||
let to: TextSize = (cursor_position + end_idx).into();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue