lint: fix lint issue

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-03-07 11:14:00 -08:00
parent cec49c83bd
commit 50cf75b8bc

View File

@@ -699,7 +699,7 @@ fn first_is_desired_char(
new_text_index: usize,
desired: char,
) -> bool {
new_text.chars().next().map_or(false, |c| {
new_text.chars().next().is_some_and(|c| {
c == desired
&& (new_text_index == 0 || full_text.chars().nth(new_text_index - 1) == Some(' '))
})