@@ -41,11 +41,10 @@ impl LanguageServer for Backend {
4141
4242 tokio:: spawn ( async move {
4343 loop {
44- let editor_process_id = params. process_id . unwrap_or_else ( || {
45- quit:: with_code ( 1 )
46- } ) ;
44+ let editor_process_id = params. process_id . unwrap_or_else ( || quit:: with_code ( 1 ) ) ;
4745
48- let editor_process_running = psutil:: process:: processes ( ) . unwrap ( )
46+ let editor_process_running = psutil:: process:: processes ( )
47+ . unwrap ( )
4948 . into_iter ( )
5049 . filter_map ( |process| process. ok ( ) )
5150 . find ( |process| process. pid ( ) == editor_process_id) ;
@@ -115,7 +114,6 @@ impl LanguageServer for Backend {
115114 }
116115 }
117116
118-
119117 if persistence. report_diagnostics {
120118 self . client
121119 . publish_diagnostics (
@@ -131,13 +129,25 @@ impl LanguageServer for Backend {
131129 let mut persistence = self . persistence . lock ( ) . await ;
132130
133131 for content_change in & params. content_changes {
134- persistence. reindex_modified_file ( & self . client , & content_change. text , & params. text_document . uri ) . await ;
132+ persistence
133+ . reindex_modified_file (
134+ & self . client ,
135+ & content_change. text ,
136+ & params. text_document . uri ,
137+ )
138+ . await ;
135139 }
136140 }
137141
138142 async fn did_save ( & self , params : DidSaveTextDocumentParams ) {
139143 let mut persistence = self . persistence . lock ( ) . await ;
140- persistence. reindex_modified_file ( & self . client , & params. text . unwrap ( ) , & params. text_document . uri ) . await ;
144+ persistence
145+ . reindex_modified_file (
146+ & self . client ,
147+ & params. text . unwrap ( ) ,
148+ & params. text_document . uri ,
149+ )
150+ . await ;
141151 }
142152
143153 async fn did_close ( & self , _: DidCloseTextDocumentParams ) {
0 commit comments