File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
crates/rust-analyzer/src/handlers Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1319,6 +1319,9 @@ pub(crate) fn handle_code_lens_resolve(
1319
1319
snap : GlobalStateSnapshot ,
1320
1320
code_lens : CodeLens ,
1321
1321
) -> anyhow:: Result < CodeLens > {
1322
+ if code_lens. data . is_none ( ) {
1323
+ return Ok ( code_lens) ;
1324
+ }
1322
1325
let Some ( annotation) = from_proto:: annotation ( & snap, code_lens. clone ( ) ) ? else {
1323
1326
return Ok ( code_lens) ;
1324
1327
} ;
@@ -1327,13 +1330,14 @@ pub(crate) fn handle_code_lens_resolve(
1327
1330
let mut acc = Vec :: new ( ) ;
1328
1331
to_proto:: code_lens ( & mut acc, & snap, annotation) ?;
1329
1332
1330
- let res = match acc. pop ( ) {
1333
+ let mut res = match acc. pop ( ) {
1331
1334
Some ( it) if acc. is_empty ( ) => it,
1332
1335
_ => {
1333
1336
never ! ( ) ;
1334
1337
code_lens
1335
1338
}
1336
1339
} ;
1340
+ res. data = None ;
1337
1341
1338
1342
Ok ( res)
1339
1343
}
You can’t perform that action at this time.
0 commit comments