File tree Expand file tree Collapse file tree 4 files changed +9
-17
lines changed Expand file tree Collapse file tree 4 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ impl Set {
131131 skip( self , db, dst) ,
132132 fields(
133133 key = self . key. as_str( ) ,
134- ? expire = self . expire. as_ref( ) . map ( Duration :: as_secs_f64 ) ,
134+ expire = ? self . expire. as_ref( ) ,
135135 ) ,
136136 ) ]
137137 pub ( crate ) async fn apply ( self , db : & Db , dst : & mut Connection ) -> crate :: Result < ( ) > {
Original file line number Diff line number Diff line change @@ -84,10 +84,10 @@ impl Connection {
8484 ConnectionState :: Open => continue ,
8585 ConnectionState :: Closed | ConnectionState :: Reset => {
8686 if !self . buffer . is_empty ( ) {
87- warn ! {
88- incomplete =? self . buffer,
89- "connection closed with incomplete frame"
90- } ;
87+ warn ! (
88+ incomplete = ? self . buffer,
89+ "connection closed with incomplete frame" ,
90+ ) ;
9191 }
9292 return Ok ( None ) ;
9393 }
@@ -104,9 +104,7 @@ impl Connection {
104104 Ok ( _) => Ok ( ConnectionState :: Open ) ,
105105 // the connection was closed abruptly by the peer
106106 Err ( e) if e. kind ( ) == ConnectionReset => {
107- warn ! {
108- "connection closed abruptly by peer"
109- } ;
107+ warn ! ( "connection closed abruptly by peer" ) ;
110108 Ok ( ConnectionState :: Reset )
111109 }
112110 // reading failed for some other reason
Original file line number Diff line number Diff line change @@ -329,10 +329,7 @@ impl Shared {
329329 }
330330
331331 // The key expired, remove it
332- debug ! {
333- key = & key. as_str( ) ,
334- "purged_expired_key" ,
335- }
332+ debug ! ( key = & key. as_str( ) , "purged_expired_key" ) ;
336333 state. entries . remove ( key) ;
337334 state. expirations . remove ( & ( when, id) ) ;
338335 }
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ impl Handler {
332332 name = "Handler::run" ,
333333 skip( self ) ,
334334 fields(
335- ? peer_addr = self . connection. peer_addr( ) . unwrap( ) ,
335+ peer_addr = % self . connection. peer_addr( ) . unwrap( ) ,
336336 ) ,
337337 ) ]
338338 async fn run ( & mut self ) -> crate :: Result < ( ) > {
@@ -387,10 +387,7 @@ impl Handler {
387387 // };
388388 // `tracing` provides structured logging, so information is
389389 // "logged" as key-value pairs.
390- warn ! {
391- %cause,
392- "failed to parse command from frame"
393- } ;
390+ warn ! ( %cause, "failed to parse command from frame" ) ;
394391 // ...and (2) respond to the client with the error:
395392 Command :: from_error ( cause)
396393 }
You can’t perform that action at this time.
0 commit comments