Skip to content

Commit 604d785

Browse files
author
duncan
committed
use underscores in the target name for test update notifications
1 parent 96925d5 commit 604d785

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)