WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 5bb714b

Browse files
fix build
1 parent 29f8e6f commit 5bb714b

File tree

2 files changed

+15
-30
lines changed

2 files changed

+15
-30
lines changed

pyrefly/lib/test/lsp/lsp_interaction/inlay_hint.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77

88
use lsp_types::request::InlayHintRequest;
9-
use serde_json::json;
109
use serde_json::Value;
10+
use serde_json::json;
1111

1212
use crate::test::lsp::lsp_interaction::object_model::ClientRequestHandle;
1313
use crate::test::lsp::lsp_interaction::object_model::InitializeSettings;
@@ -92,8 +92,7 @@ fn test_inlay_hint_default_config() {
9292
}]
9393
}
9494
]),
95-
)
96-
.unwrap();
95+
);
9796

9897
interaction.shutdown().unwrap();
9998
}
@@ -223,8 +222,7 @@ fn test_inlay_hint_disable_variables() {
223222
"range":{"end":{"character":15,"line":14},"start":{"character":15,"line":14}}
224223
}]
225224
}]),
226-
)
227-
.unwrap();
225+
);
228226

229227
interaction.shutdown().unwrap();
230228
}
@@ -275,8 +273,7 @@ fn test_inlay_hint_disable_returns() {
275273
"range":{"end":{"character":6,"line":11},"start":{"character":6,"line":11}}
276274
}]
277275
}]),
278-
)
279-
.unwrap();
276+
);
280277

281278
interaction.shutdown().unwrap();
282279
}
@@ -335,13 +332,10 @@ fn test_inlay_hint_labels_support_goto_type_definition() {
335332
interaction.shutdown().unwrap();
336333
}
337334

338-
fn expect_inlay_hint_response(
339-
handle: ClientRequestHandle<'_, InlayHintRequest>,
340-
expected: Value,
341-
) {
335+
fn expect_inlay_hint_response(handle: ClientRequestHandle<'_, InlayHintRequest>, expected: Value) {
342336
let mut expected = expected;
343337
strip_inlay_hint_locations(&mut expected);
344-
handle.expect_response_with(move |result| {
338+
let _ = handle.expect_response_with(move |result| {
345339
let mut actual_json = serde_json::to_value(&result).unwrap();
346340
strip_inlay_hint_locations(&mut actual_json);
347341
actual_json == expected

pyrefly/lib/test/lsp/lsp_interaction/notebook_inlay_hint.rs

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77

88
use lsp_types::request::InlayHintRequest;
9-
use serde_json::json;
109
use serde_json::Value;
10+
use serde_json::json;
1111

1212
use crate::test::lsp::lsp_interaction::object_model::ClientRequestHandle;
1313
use 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

Comments
 (0)