Enable clippy::search_is_some (#8748)

This PR enables the
[`clippy::search_is_some`](https://rust-lang.github.io/rust-clippy/master/index.html#/search_is_some)
rule and fixes the outstanding violations.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2024-03-02 21:46:30 -05:00
committed by GitHub
parent 3ab16d8012
commit 328c8a94b3
5 changed files with 7 additions and 9 deletions
+2 -3
View File
@@ -6444,10 +6444,9 @@ impl Editor {
&& !movement::is_inside_word(&display_map, display_range.end))
{
// TODO: This is n^2, because we might check all the selections
if selections
if !selections
.iter()
.find(|selection| selection.range().overlaps(&offset_range))
.is_none()
.any(|selection| selection.range().overlaps(&offset_range))
{
next_selected_range = Some(offset_range);
break;