File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -525,11 +525,7 @@ where
525525 response. send_lossy( info) ;
526526 }
527527 Message :: GetVerified { round, response } => {
528- let block = self
529- . cache
530- . get_verified( round)
531- . await
532- . map( Into :: into) ;
528+ let block = self . cache. get_verified( round) . await . map( Into :: into) ;
533529 response. send_lossy( block) ;
534530 }
535531 Message :: Forward {
@@ -559,7 +555,8 @@ where
559555 // `cache_verified` is a no-op because the round is below
560556 // the retention floor (and no longer is required by consensus
561557 // to make progress).
562- self . cache_verified( round, block. digest( ) , block. clone( ) ) . await ;
558+ self . cache_verified( round, block. digest( ) , block. clone( ) )
559+ . await ;
563560 // Retain the block in memory so the subsequent
564561 // `Forward` can broadcast it without reloading from
565562 // storage. An older retained proposal (if any) is
@@ -805,9 +802,7 @@ where
805802 }
806803
807804 // Batch verify and process all delivers.
808- needs_sync |= self
809- . verify_delivered( delivers, & mut application)
810- . await ;
805+ needs_sync |= self . verify_delivered( delivers, & mut application) . await ;
811806
812807 // Attempt to fill gaps before handling produce requests (so we
813808 // can serve data we just received).
Original file line number Diff line number Diff line change @@ -8717,9 +8717,7 @@ mod tests {
87178717 select ! {
87188718 msg = batcher_receiver. recv( ) => match msg. unwrap( ) {
87198719 batcher:: Message :: Update {
8720- current,
8721- response,
8722- ..
8720+ current, response, ..
87238721 } if current > target_view => {
87248722 // Signal leader inactivity to trigger the timeout path.
87258723 response. send( Some ( TimeoutReason :: Inactivity ) ) . unwrap( ) ;
Original file line number Diff line number Diff line change @@ -346,11 +346,7 @@ stability_scope!(BETA {
346346 /// "follow that progress" (but not contribute to it). We call the former "primary" and the latter "secondary".
347347 /// When both are tracked, mechanisms favor "primary" peers but continue to replicate data to "secondary" peers (
348348 /// often both gossiping data to them and answering requests from them).
349- fn track<R >(
350- & mut self ,
351- id: u64 ,
352- peers: R ,
353- ) -> impl Future <Output = ( ) > + Send
349+ fn track<R >( & mut self , id: u64 , peers: R ) -> impl Future <Output = ( ) > + Send
354350 where
355351 R : Into <TrackedPeers <Self :: PublicKey >> + Send ;
356352 }
@@ -382,11 +378,7 @@ stability_scope!(BETA {
382378 /// "follow that progress" (but not contribute to it). We call the former "primary" and the latter "secondary".
383379 /// When both are tracked, mechanisms favor "primary" peers but continue to replicate data to "secondary" peers (
384380 /// often both gossiping data to them and answering requests from them).
385- fn track<R >(
386- & mut self ,
387- id: u64 ,
388- peers: R ,
389- ) -> impl Future <Output = ( ) > + Send
381+ fn track<R >( & mut self , id: u64 , peers: R ) -> impl Future <Output = ( ) > + Send
390382 where
391383 R : Into <AddressableTrackedPeers <Self :: PublicKey >> + Send ;
392384
Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ mod tests {
496496 event = cons_out1. recv( ) => {
497497 panic!( "fetch should wait for the initial peer set, got {event:?}" ) ;
498498 } ,
499- _ = context. sleep( Duration :: from_millis( 200 ) ) => { }
499+ _ = context. sleep( Duration :: from_millis( 200 ) ) => { } ,
500500 } ;
501501
502502 oracle
Original file line number Diff line number Diff line change @@ -1688,7 +1688,7 @@ mod tests {
16881688 } ,
16891689 ) ,
16901690 ] ;
1691- base_diff. sort_by ( |a, b | a. 0 . cmp ( & b . 0 ) ) ;
1691+ base_diff. sort_by_key ( |a| a. 0 ) ;
16921692
16931693 let creates = extract_parent_deleted_creates ( & mut mutations, & base_diff) ;
16941694
Original file line number Diff line number Diff line change @@ -1253,12 +1253,12 @@ pub(super) mod test {
12531253 let mut kvs_first: Vec < ( Digest , Digest ) > = ( 0u64 ..5 )
12541254 . map ( |i| ( Sha256 :: hash ( & i. to_be_bytes ( ) ) , Sha256 :: fill ( i as u8 ) ) )
12551255 . collect ( ) ;
1256- kvs_first. sort_by ( |a, b | a. 0 . cmp ( & b . 0 ) ) ;
1256+ kvs_first. sort_by_key ( |a| a. 0 ) ;
12571257
12581258 let mut kvs_second: Vec < ( Digest , Digest ) > = ( 5u64 ..10 )
12591259 . map ( |i| ( Sha256 :: hash ( & i. to_be_bytes ( ) ) , Sha256 :: fill ( i as u8 ) ) )
12601260 . collect ( ) ;
1261- kvs_second. sort_by ( |a, b | a. 0 . cmp ( & b . 0 ) ) ;
1261+ kvs_second. sort_by_key ( |a| a. 0 ) ;
12621262
12631263 // Parent batch: set keys 0..5.
12641264 let mut parent = db. new_batch ( ) ;
You can’t perform that action at this time.
0 commit comments