use find() instead of filter().next()
This commit is contained in:
parent
4df741ecb2
commit
f54fef85aa
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ fn hover_text_from_name_kind(
|
|||
|
||||
pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeInfo<HoverResult>> {
|
||||
let file = db.parse_or_expand(position.file_id.into())?;
|
||||
let token = file.token_at_offset(position.offset).filter(|it| !it.kind().is_trivia()).next()?;
|
||||
let token = file.token_at_offset(position.offset).find(|it| !it.kind().is_trivia())?;
|
||||
let token = descend_into_macros(db, position.file_id, token);
|
||||
|
||||
let mut res = HoverResult::new();
|
||||
|
|
Loading…
Add table
Reference in a new issue