fix: Fix lens location "above_whole_item" breaking lenses

This commit is contained in:
Lukas Wirth 2023-09-13 22:01:04 +02:00
parent affe5a7315
commit 712e67cf11
3 changed files with 16 additions and 18 deletions

View file

@ -94,10 +94,9 @@ pub(crate) fn annotations(
enum_
.variants(db)
.into_iter()
.map(|variant| {
.filter_map(|variant| {
variant.source(db).and_then(|node| name_range(db, node, file_id))
})
.flatten()
.for_each(|range| {
let (annotation_range, target_position) = mk_ranges(range);
annotations.push(Annotation {