Skip to content

Commit 7cdca72

Browse files
committed
Use all not instead of find is none
1 parent e4d053e commit 7cdca72

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/line-index/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ impl LineIndex {
161161
.get(&ret.line)
162162
.into_iter()
163163
.flat_map(|it| it.iter())
164-
.find(|it| it.start < col && col < it.end)
165-
.is_none()
164+
.all(|it| !(it.start < col && col < it.end))
166165
.then_some(ret)
167166
}
168167

0 commit comments

Comments
 (0)