Fix incorrect references annotation

This commit is contained in:
ivan770 2021-02-13 13:22:12 +02:00
parent 185da286d2
commit 02ad828c6d
No known key found for this signature in database
GPG Key ID: D8C4BD5AE4D9CC4D

View File

@ -129,9 +129,10 @@ pub(crate) fn resolve_annotation(db: &RootDatabase, mut annotation: Annotation)
result
.references
.into_iter()
.map(|(_, access)| access.into_iter())
.map(|(file_id, access)| {
access.into_iter().map(move |(range, _)| FileRange { file_id, range })
})
.flatten()
.map(|(range, _)| FileRange { file_id: position.file_id, range })
.collect()
});
}