@@ -260,8 +260,7 @@ impl LanguageServer for Backend {
260260 /// See: <https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_didChangeConfiguration>
261261 async fn did_change_configuration ( & self , params : DidChangeConfigurationParams ) {
262262 let workers = self . workspace_workers . read ( ) . await ;
263- let new_diagnostics: papaya:: HashMap < String , Vec < Diagnostic > , FxBuildHasher > =
264- ConcurrentHashMap :: default ( ) ;
263+ let mut new_diagnostics = Vec :: new ( ) ;
265264 let mut removing_registrations = vec ! [ ] ;
266265 let mut adding_registrations = vec ! [ ] ;
267266
@@ -337,10 +336,10 @@ impl LanguageServer for Backend {
337336
338337 if let Some ( diagnostics) = diagnostics {
339338 for ( uri, reports) in & diagnostics. pin ( ) {
340- new_diagnostics. pin ( ) . insert (
339+ new_diagnostics. push ( (
341340 uri. clone ( ) ,
342341 reports. iter ( ) . map ( |d| d. diagnostic . clone ( ) ) . collect ( ) ,
343- ) ;
342+ ) ) ;
344343 }
345344 }
346345
@@ -364,13 +363,7 @@ impl LanguageServer for Backend {
364363 }
365364
366365 if !new_diagnostics. is_empty ( ) {
367- let x = & new_diagnostics
368- . pin ( )
369- . into_iter ( )
370- . map ( |( key, value) | ( key. clone ( ) , value. clone ( ) ) )
371- . collect :: < Vec < _ > > ( ) ;
372-
373- self . publish_all_diagnostics ( x) . await ;
366+ self . publish_all_diagnostics ( & new_diagnostics) . await ;
374367 }
375368
376369 // override the existing formatting registration
0 commit comments