diff --git a/src/shape/at.rs b/src/shape/at.rs index 68eb0f5..c0cd974 100644 --- a/src/shape/at.rs +++ b/src/shape/at.rs @@ -715,12 +715,7 @@ impl<'a, 'b, 'c> ApplyContext<'a, 'b, 'c> { } fn next(&self, index: usize) -> Option { - for i in (index + 1)..self.s.end { - if !self.ignored(i) { - return Some(i); - } - } - None + ((index + 1)..self.s.end).find(|&i| !self.ignored(i)) } fn previous(&self, index: usize) -> Option {