66 */
77
88use lsp_types:: request:: InlayHintRequest ;
9- use serde_json:: json;
109use serde_json:: Value ;
10+ use serde_json:: json;
1111
1212use crate :: test:: lsp:: lsp_interaction:: object_model:: ClientRequestHandle ;
1313use crate :: test:: lsp:: lsp_interaction:: object_model:: InitializeSettings ;
@@ -35,8 +35,7 @@ fn test_inlay_hints() {
3535 ) ;
3636
3737 expect_inlay_hint_response (
38- interaction
39- . inlay_hint_cell ( "notebook.ipynb" , "cell1" , 0 , 0 , 100 , 0 ) ,
38+ interaction. inlay_hint_cell ( "notebook.ipynb" , "cell1" , 0 , 0 , 100 , 0 ) ,
4039 json ! ( [ {
4140 "label" : [
4241 { "value" : " -> " } ,
@@ -59,12 +58,10 @@ fn test_inlay_hints() {
5958 "range" : { "end" : { "character" : 21 , "line" : 0 } , "start" : { "character" : 21 , "line" : 0 } }
6059 } ]
6160 } ] ) ,
62- )
63- . unwrap ( ) ;
61+ ) ;
6462
6563 expect_inlay_hint_response (
66- interaction
67- . inlay_hint_cell ( "notebook.ipynb" , "cell2" , 0 , 0 , 100 , 0 ) ,
64+ interaction. inlay_hint_cell ( "notebook.ipynb" , "cell2" , 0 , 0 , 100 , 0 ) ,
6865 json ! ( [ {
6966 "label" : [
7067 { "value" : ": " } ,
@@ -87,12 +84,10 @@ fn test_inlay_hints() {
8784 "range" : { "end" : { "character" : 6 , "line" : 0 } , "start" : { "character" : 6 , "line" : 0 } }
8885 } ]
8986 } ] ) ,
90- )
91- . unwrap ( ) ;
87+ ) ;
9288
9389 expect_inlay_hint_response (
94- interaction
95- . inlay_hint_cell ( "notebook.ipynb" , "cell3" , 0 , 0 , 100 , 0 ) ,
90+ interaction. inlay_hint_cell ( "notebook.ipynb" , "cell3" , 0 , 0 , 100 , 0 ) ,
9691 json ! ( [ {
9792 "label" : [
9893 { "value" : " -> " } ,
@@ -107,18 +102,14 @@ fn test_inlay_hints() {
107102 "range" : { "end" : { "character" : 15 , "line" : 0 } , "start" : { "character" : 15 , "line" : 0 } }
108103 } ]
109104 } ] ) ,
110- )
111- . unwrap ( ) ;
105+ ) ;
112106 interaction. shutdown ( ) . unwrap ( ) ;
113107}
114108
115- fn expect_inlay_hint_response (
116- handle : ClientRequestHandle < ' _ , InlayHintRequest > ,
117- expected : Value ,
118- ) {
109+ fn expect_inlay_hint_response ( handle : ClientRequestHandle < ' _ , InlayHintRequest > , expected : Value ) {
119110 let mut expected = expected;
120111 strip_inlay_hint_locations ( & mut expected) ;
121- handle. expect_response_with ( move |result| {
112+ let _ = handle. expect_response_with ( move |result| {
122113 let mut actual_json = serde_json:: to_value ( & result) . unwrap ( ) ;
123114 strip_inlay_hint_locations ( & mut actual_json) ;
124115 actual_json == expected
0 commit comments