remove unnecessary lazy evaluations

This commit is contained in:
Daniel Eades 2022-12-30 08:30:23 +00:00
parent 7530d76f00
commit cc80c5bd07
31 changed files with 50 additions and 51 deletions

View file

@ -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();