Use all not instead of find is none

This commit is contained in:
Ariel Davis 2023-05-06 15:06:23 -07:00
parent e4d053e794
commit 7cdca727a8

View file

@ -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)
}