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(
13191319 snap : GlobalStateSnapshot ,
13201320 code_lens : CodeLens ,
13211321) -> anyhow:: Result < CodeLens > {
1322+ if code_lens. data . is_none ( ) {
1323+ return Ok ( code_lens) ;
1324+ }
13221325 let Some ( annotation) = from_proto:: annotation ( & snap, code_lens. clone ( ) ) ? else {
13231326 return Ok ( code_lens) ;
13241327 } ;
@@ -1327,13 +1330,14 @@ pub(crate) fn handle_code_lens_resolve(
13271330 let mut acc = Vec :: new ( ) ;
13281331 to_proto:: code_lens ( & mut acc, & snap, annotation) ?;
13291332
1330- let res = match acc. pop ( ) {
1333+ let mut res = match acc. pop ( ) {
13311334 Some ( it) if acc. is_empty ( ) => it,
13321335 _ => {
13331336 never ! ( ) ;
13341337 code_lens
13351338 }
13361339 } ;
1340+ res. data = None ;
13371341
13381342 Ok ( res)
13391343}
You can’t perform that action at this time.
0 commit comments