mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
convenience api
This commit is contained in:
parent
a6df224f7d
commit
191a6ba330
8 changed files with 63 additions and 50 deletions
|
@ -155,7 +155,7 @@ pub struct CommentIter {
|
|||
impl Iterator for CommentIter {
|
||||
type Item = ast::Comment;
|
||||
fn next(&mut self) -> Option<ast::Comment> {
|
||||
self.iter.by_ref().find_map(|el| el.as_token().cloned().and_then(ast::Comment::cast))
|
||||
self.iter.by_ref().find_map(|el| el.into_token().and_then(ast::Comment::cast))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue