File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
127
127
decl_with_detail( it, Some ( detail) )
128
128
} ,
129
129
ast:: StructDef ( it) => decl( it) ,
130
+ ast:: UnionDef ( it) => decl( it) ,
130
131
ast:: EnumDef ( it) => decl( it) ,
131
132
ast:: EnumVariant ( it) => decl( it) ,
132
133
ast:: TraitDef ( it) => decl( it) ,
Original file line number Diff line number Diff line change @@ -878,9 +878,14 @@ pub(crate) fn handle_code_lens(
878
878
snap. analysis
879
879
. file_structure ( file_id) ?
880
880
. into_iter ( )
881
- . filter ( |it| match it. kind {
882
- SyntaxKind :: TRAIT_DEF | SyntaxKind :: STRUCT_DEF | SyntaxKind :: ENUM_DEF => true ,
883
- _ => false ,
881
+ . filter ( |it| {
882
+ matches ! (
883
+ it. kind,
884
+ SyntaxKind :: TRAIT_DEF
885
+ | SyntaxKind :: STRUCT_DEF
886
+ | SyntaxKind :: ENUM_DEF
887
+ | SyntaxKind :: UNION_DEF
888
+ )
884
889
} )
885
890
. map ( |it| {
886
891
let range = to_proto:: range ( & line_index, it. node_range ) ;
You can’t perform that action at this time.
0 commit comments