File tree 4 files changed +9
-17
lines changed
4 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ impl Set {
131
131
skip( self , db, dst) ,
132
132
fields(
133
133
key = self . key. as_str( ) ,
134
- ? expire = self . expire. as_ref( ) . map ( Duration :: as_secs_f64 ) ,
134
+ expire = ? self . expire. as_ref( ) ,
135
135
) ,
136
136
) ]
137
137
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 {
84
84
ConnectionState :: Open => continue ,
85
85
ConnectionState :: Closed | ConnectionState :: Reset => {
86
86
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
+ ) ;
91
91
}
92
92
return Ok ( None ) ;
93
93
}
@@ -104,9 +104,7 @@ impl Connection {
104
104
Ok ( _) => Ok ( ConnectionState :: Open ) ,
105
105
// the connection was closed abruptly by the peer
106
106
Err ( e) if e. kind ( ) == ConnectionReset => {
107
- warn ! {
108
- "connection closed abruptly by peer"
109
- } ;
107
+ warn ! ( "connection closed abruptly by peer" ) ;
110
108
Ok ( ConnectionState :: Reset )
111
109
}
112
110
// reading failed for some other reason
Original file line number Diff line number Diff line change @@ -329,10 +329,7 @@ impl Shared {
329
329
}
330
330
331
331
// 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" ) ;
336
333
state. entries . remove ( key) ;
337
334
state. expirations . remove ( & ( when, id) ) ;
338
335
}
Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ impl Handler {
323
323
name = "Handler::run" ,
324
324
skip( self ) ,
325
325
fields(
326
- ? peer_addr = self . connection. peer_addr( ) . unwrap( ) ,
326
+ peer_addr = % self . connection. peer_addr( ) . unwrap( ) ,
327
327
) ,
328
328
) ]
329
329
async fn run ( & mut self ) -> crate :: Result < ( ) > {
@@ -378,10 +378,7 @@ impl Handler {
378
378
// };
379
379
// `tracing` provides structured logging, so information is
380
380
// "logged" as key-value pairs.
381
- warn ! {
382
- %cause,
383
- "failed to parse command from frame"
384
- } ;
381
+ warn ! ( %cause, "failed to parse command from frame" ) ;
385
382
// ...and (2) respond to the client with the error:
386
383
Command :: from_error ( cause)
387
384
}
You can’t perform that action at this time.
0 commit comments