diff options
| author | Ariel Davis <ariel.z.davis@icloud.com> | 2023-05-06 15:06:23 -0700 |
|---|---|---|
| committer | Ariel Davis <ariel.z.davis@icloud.com> | 2023-05-06 15:06:23 -0700 |
| commit | 7cdca727a8ecf583c4f1fef2ac49410434656c55 (patch) | |
| tree | 706c39009f5c78731ccecbeec6ae0f841fe83631 /lib | |
| parent | e4d053e794ff48f773debaaf6df4966d711597c1 (diff) | |
| download | rust-7cdca727a8ecf583c4f1fef2ac49410434656c55.tar.gz rust-7cdca727a8ecf583c4f1fef2ac49410434656c55.zip | |
Use all not instead of find is none
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/line-index/src/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/line-index/src/lib.rs b/lib/line-index/src/lib.rs index c3f352b5d19..e70bf68befa 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) } |
