@@ -415,10 +415,9 @@ impl ProtoLanguageServer {
415415 if let Some ( diagnostics) =
416416 self . state
417417 . upsert_file ( & uri, content, & ipath, 8 , & pconf. config , true )
418+ && let Err ( e) = self . client . publish_diagnostics ( diagnostics)
418419 {
419- if let Err ( e) = self . client . publish_diagnostics ( diagnostics) {
420- error ! ( error=%e, "failed to publish diagnostics" )
421- }
420+ error ! ( error=%e, "failed to publish diagnostics" )
422421 }
423422 ControlFlow :: Continue ( ( ) )
424423 }
@@ -441,10 +440,9 @@ impl ProtoLanguageServer {
441440 if let Some ( diagnostics) =
442441 self . state
443442 . upsert_file ( & uri, content, & ipath, 8 , & pconf. config , true )
443+ && let Err ( e) = self . client . publish_diagnostics ( diagnostics)
444444 {
445- if let Err ( e) = self . client . publish_diagnostics ( diagnostics) {
446- error ! ( error=%e, "failed to publish diagnostics" )
447- }
445+ error ! ( error=%e, "failed to publish diagnostics" )
448446 }
449447 ControlFlow :: Continue ( ( ) )
450448 }
@@ -467,10 +465,9 @@ impl ProtoLanguageServer {
467465 if let Some ( diagnostics) =
468466 self . state
469467 . upsert_file ( & uri, content, & ipath, 8 , & pconf. config , false )
468+ && let Err ( e) = self . client . publish_diagnostics ( diagnostics)
470469 {
471- if let Err ( e) = self . client . publish_diagnostics ( diagnostics) {
472- error ! ( error=%e, "failed to publish diagnostics" )
473- }
470+ error ! ( error=%e, "failed to publish diagnostics" )
474471 }
475472 ControlFlow :: Continue ( ( ) )
476473 }
0 commit comments