Unnamed repository; edit this file 'description' to name the repository.
Use all not instead of find is none
Ariel Davis 2023-05-07
parent e4d053e · commit 7cdca72
-rw-r--r--lib/line-index/src/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/line-index/src/lib.rs b/lib/line-index/src/lib.rs
index c3f352b5d1..e70bf68bef 100644
--- a/lib/line-index/src/lib.rs
+++ b/lib/line-index/src/lib.rs
@@ -161,8 +161,7 @@ impl LineIndex {
.get(&ret.line)
.into_iter()
.flat_map(|it| it.iter())
- .find(|it| it.start < col && col < it.end)
- .is_none()
+ .all(|it| !(it.start < col && col < it.end))
.then_some(ret)
}