Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpeach committed Dec 3, 2024
1 parent c687202 commit 9c123e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules/unlinked_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ fn is_start_boundary(text: &str, start: usize) -> bool {
text[..start]
.chars()
.next_back()
.map_or(true, char::is_whitespace)
.is_none_or(char::is_whitespace)
}
}

Expand All @@ -149,7 +149,7 @@ fn is_end_boundary(text: &str, end: usize) -> bool {
if end == text.len() {
true
} else {
text[end..].chars().next().map_or(true, char::is_whitespace)
text[end..].chars().next().is_none_or(char::is_whitespace)
}
}

Expand Down

0 comments on commit 9c123e5

Please sign in to comment.