Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 35bb73a

Browse files
author
duncan
committed
use underscores in the target name for test update notifications
1 parent 7425cc1 commit 35bb73a

File tree

1 file changed

+3
-1
lines changed
  • src/tools/rust-analyzer/crates/rust-analyzer/src

1 file changed

+3
-1
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,9 @@ impl GlobalState {
969969
TestState::Ok => lsp_ext::TestState::Passed,
970970
TestState::Failed { stdout } => lsp_ext::TestState::Failed { message: stdout },
971971
};
972-
let test_id = format!("{}::{name}", message.target.target);
972+
973+
// The notification requires the namespace form (with underscores) of the target
974+
let test_id = format!("{}::{name}", message.target.target.replace('-', "_"));
973975

974976
self.send_notification::<lsp_ext::ChangeTestState>(
975977
lsp_ext::ChangeTestStateParams { test_id, state },

0 commit comments

Comments
 (0)