mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 12:04:43 +00:00 
			
		
		
		
	use underscores in the target name for test update notifications
This commit is contained in:
		
							parent
							
								
									96925d5105
								
							
						
					
					
						commit
						604d78568c
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -969,7 +969,9 @@ impl GlobalState { | ||||||
|                     TestState::Ok => lsp_ext::TestState::Passed, |                     TestState::Ok => lsp_ext::TestState::Passed, | ||||||
|                     TestState::Failed { stdout } => lsp_ext::TestState::Failed { message: stdout }, |                     TestState::Failed { stdout } => lsp_ext::TestState::Failed { message: stdout }, | ||||||
|                 }; |                 }; | ||||||
|                 let test_id = format!("{}::{name}", message.target.target); | 
 | ||||||
|  |                 // The notification requires the namespace form (with underscores) of the target
 | ||||||
|  |                 let test_id = format!("{}::{name}", message.target.target.replace('-', "_")); | ||||||
| 
 | 
 | ||||||
|                 self.send_notification::<lsp_ext::ChangeTestState>( |                 self.send_notification::<lsp_ext::ChangeTestState>( | ||||||
|                     lsp_ext::ChangeTestStateParams { test_id, state }, |                     lsp_ext::ChangeTestStateParams { test_id, state }, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 duncan
						duncan