@@ -250,10 +250,10 @@ impl VssManager {
250250
251251 pub fn get_pending_writes ( & self ) -> Vec < ( String , VssPendingWrite ) > {
252252 self . check_timeout ( ) ;
253- let writes = self . pending_writes . lock ( ) . expect (
254- "
255- Failed to lock pending writes" ,
256- ) ;
253+ let writes = self
254+ . pending_writes
255+ . lock ( )
256+ . expect ( "Failed to lock pending writes" ) ;
257257 writes. iter ( ) . map ( |( k, v) | ( k. clone ( ) , v. clone ( ) ) ) . collect ( )
258258 }
259259
@@ -271,33 +271,30 @@ impl VssManager {
271271 }
272272
273273 pub fn on_complete_write ( & self , key : String ) {
274- let mut pending_writes = self . pending_writes . lock ( ) . expect (
275- "
276- Failed to lock pending writes" ,
277- ) ;
274+ let mut pending_writes = self
275+ . pending_writes
276+ . lock ( )
277+ . expect ( "Failed to lock pending writes" ) ;
278278 pending_writes. remove ( & key) ;
279279 }
280280
281281 pub fn has_in_progress ( & self ) -> bool {
282282 self . check_timeout ( ) ;
283- let writes = self . pending_writes . lock ( ) . expect (
284- "
285- Failed to lock pending writes" ,
286- ) ;
283+ let writes = self
284+ . pending_writes
285+ . lock ( )
286+ . expect ( "Failed to lock pending writes" ) ;
287287 !writes. is_empty ( )
288288 }
289289
290290 fn check_timeout ( & self ) {
291291 let current_time = utils:: now ( ) . as_secs ( ) ;
292- let mut writes = self . pending_writes . lock ( ) . expect (
293- "
294- Failed to lock pending writes" ,
295- ) ;
292+ let mut writes = self
293+ . pending_writes
294+ . lock ( )
295+ . expect ( "Failed to lock pending writes" ) ;
296296 let logger = {
297- let guard = self . logger . lock ( ) . expect (
298- "
299- Failed to lock logger" ,
300- ) ;
297+ let guard = self . logger . lock ( ) . expect ( "Failed to lock logger" ) ;
301298 guard. clone ( )
302299 } ;
303300 writes. retain ( |key, write| {
0 commit comments