@@ -555,7 +555,7 @@ pub(crate) fn handle_runnables(
555
555
if should_skip_target ( & runnable, cargo_spec. as_ref ( ) ) {
556
556
continue ;
557
557
}
558
- let mut runnable = to_proto:: runnable ( & snap, file_id , runnable) ?;
558
+ let mut runnable = to_proto:: runnable ( & snap, runnable) ?;
559
559
if expect_test {
560
560
runnable. label = format ! ( "{} + expect" , runnable. label) ;
561
561
runnable. args . expect_test = Some ( true ) ;
@@ -773,7 +773,7 @@ pub(crate) fn handle_hover(
773
773
contents : HoverContents :: Markup ( to_proto:: markup_content ( info. info . markup ) ) ,
774
774
range : Some ( range) ,
775
775
} ,
776
- actions : prepare_hover_actions ( & snap, position . file_id , & info. info . actions ) ,
776
+ actions : prepare_hover_actions ( & snap, & info. info . actions ) ,
777
777
} ;
778
778
779
779
Ok ( Some ( hover) )
@@ -1438,17 +1438,16 @@ fn show_impl_command_link(
1438
1438
1439
1439
fn runnable_action_links (
1440
1440
snap : & GlobalStateSnapshot ,
1441
- file_id : FileId ,
1442
1441
runnable : Runnable ,
1443
1442
) -> Option < lsp_ext:: CommandLinkGroup > {
1444
- let cargo_spec = CargoTargetSpec :: for_file ( & snap, file_id) . ok ( ) ?;
1443
+ let cargo_spec = CargoTargetSpec :: for_file ( & snap, runnable . nav . file_id ) . ok ( ) ?;
1445
1444
let hover_config = snap. config . hover ( ) ;
1446
1445
if !hover_config. runnable ( ) || should_skip_target ( & runnable, cargo_spec. as_ref ( ) ) {
1447
1446
return None ;
1448
1447
}
1449
1448
1450
1449
let action: & ' static _ = runnable. action ( ) ;
1451
- to_proto:: runnable ( snap, file_id , runnable) . ok ( ) . map ( |r| {
1450
+ to_proto:: runnable ( snap, runnable) . ok ( ) . map ( |r| {
1452
1451
let mut group = lsp_ext:: CommandLinkGroup :: default ( ) ;
1453
1452
1454
1453
if hover_config. run {
@@ -1487,7 +1486,6 @@ fn goto_type_action_links(
1487
1486
1488
1487
fn prepare_hover_actions (
1489
1488
snap : & GlobalStateSnapshot ,
1490
- file_id : FileId ,
1491
1489
actions : & [ HoverAction ] ,
1492
1490
) -> Vec < lsp_ext:: CommandLinkGroup > {
1493
1491
if snap. config . hover ( ) . none ( ) || !snap. config . hover_actions ( ) {
@@ -1498,7 +1496,7 @@ fn prepare_hover_actions(
1498
1496
. iter ( )
1499
1497
. filter_map ( |it| match it {
1500
1498
HoverAction :: Implementation ( position) => show_impl_command_link ( snap, position) ,
1501
- HoverAction :: Runnable ( r) => runnable_action_links ( snap, file_id , r. clone ( ) ) ,
1499
+ HoverAction :: Runnable ( r) => runnable_action_links ( snap, r. clone ( ) ) ,
1502
1500
HoverAction :: GoToType ( targets) => goto_type_action_links ( snap, targets) ,
1503
1501
} )
1504
1502
. collect ( )
0 commit comments