diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-19 17:08:17 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-19 17:08:17 +0100 |
commit | f697d27c31ba4486b9711893a93505a05319a2dc (patch) | |
tree | 9c7996d6ac7323da527fb53171b9275545d1640a /crates/ra_syntax/src/ast/traits.rs | |
parent | 7bc9dec7cf195bc73a88d7c740f9d0bed1019e98 (diff) | |
parent | 191a6ba330bd47fc3b9cc05d59b2d456b471eb89 (diff) |
Merge #1554
1554: convenience api r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast/traits.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/traits.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/ast/traits.rs b/crates/ra_syntax/src/ast/traits.rs index ecbd2d427..6ed1b5213 100644 --- a/crates/ra_syntax/src/ast/traits.rs +++ b/crates/ra_syntax/src/ast/traits.rs | |||
@@ -155,7 +155,7 @@ pub struct CommentIter { | |||
155 | impl Iterator for CommentIter { | 155 | impl Iterator for CommentIter { |
156 | type Item = ast::Comment; | 156 | type Item = ast::Comment; |
157 | fn next(&mut self) -> Option<ast::Comment> { | 157 | fn next(&mut self) -> Option<ast::Comment> { |
158 | self.iter.by_ref().find_map(|el| el.as_token().cloned().and_then(ast::Comment::cast)) | 158 | self.iter.by_ref().find_map(|el| el.into_token().and_then(ast::Comment::cast)) |
159 | } | 159 | } |
160 | } | 160 | } |
161 | 161 | ||