diff options
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/ast/mod.rs b/crates/ra_syntax/src/ast/mod.rs index 34958b6cb..900426a8a 100644 --- a/crates/ra_syntax/src/ast/mod.rs +++ b/crates/ra_syntax/src/ast/mod.rs | |||
@@ -259,9 +259,8 @@ impl<'a, N: AstNode<'a>> Iterator for AstChildren<'a, N> { | |||
259 | type Item = N; | 259 | type Item = N; |
260 | fn next(&mut self) -> Option<N> { | 260 | fn next(&mut self) -> Option<N> { |
261 | loop { | 261 | loop { |
262 | match N::cast(self.inner.next()?) { | 262 | if let Some(n) = N::cast(self.inner.next()?) { |
263 | Some(n) => return Some(n), | 263 | return Some(n); |
264 | None => (), | ||
265 | } | 264 | } |
266 | } | 265 | } |
267 | } | 266 | } |