@@ -223,7 +223,7 @@ impl Consensus {
223223 & runtime,
224224 leader_established_in_ms,
225225 )
226- . map_err ( |err| anyhow ! ( "Failed to initialize Consensus for new Raft state: {}" , err ) ) ?;
226+ . map_err ( |err| anyhow ! ( "Failed to initialize Consensus for new Raft state: {err}" ) ) ?;
227227 } else {
228228 runtime
229229 . block_on ( Self :: recover (
@@ -234,10 +234,7 @@ impl Consensus {
234234 tls_config. clone ( ) ,
235235 ) )
236236 . map_err ( |err| {
237- anyhow ! (
238- "Failed to recover Consensus from existing Raft state: {}" ,
239- err
240- )
237+ anyhow ! ( "Failed to recover Consensus from existing Raft state: {err}" )
241238 } ) ?;
242239
243240 if bootstrap_peer. is_some ( ) || uri. is_some ( ) {
@@ -455,7 +452,7 @@ impl Consensus {
455452 . parse ( )
456453 . context ( format ! ( "Failed to parse peer URI: {}" , peer. uri) ) ?,
457454 )
458- . map_err ( |err| anyhow ! ( "Failed to add peer: {}" , err ) ) ?
455+ . map_err ( |err| anyhow ! ( "Failed to add peer: {err}" ) ) ?
459456 }
460457 // Only first peer has itself as a voter in the initial conf state.
461458 // This needs to be propagated manually to other peers as it is not contained in any log entry.
@@ -922,7 +919,7 @@ impl Consensus {
922919
923920 store
924921 . append_entries ( ready. take_entries ( ) )
925- . map_err ( |err| anyhow ! ( "Failed to append entries: {}" , err ) ) ?
922+ . map_err ( |err| anyhow ! ( "Failed to append entries: {err}" ) ) ?
926923 }
927924
928925 if let Some ( hs) = ready. hs ( ) {
@@ -932,7 +929,7 @@ impl Consensus {
932929
933930 store
934931 . set_hard_state ( hs. clone ( ) )
935- . map_err ( |err| anyhow ! ( "Failed to set hard state: {}" , err ) ) ?
932+ . map_err ( |err| anyhow ! ( "Failed to set hard state: {err}" ) ) ?
936933 }
937934
938935 let role_change = ready. ss ( ) . map ( |ss| ss. raft_state ) ;
@@ -995,7 +992,7 @@ impl Consensus {
995992
996993 store
997994 . set_commit_index ( commit)
998- . map_err ( |err| anyhow ! ( "Failed to set commit index: {}" , err ) ) ?;
995+ . map_err ( |err| anyhow ! ( "Failed to set commit index: {err}" ) ) ?;
999996 }
1000997
1001998 self . send_messages ( light_rd. take_messages ( ) ) ;
@@ -1392,7 +1389,7 @@ impl RaftMessageSender {
13921389 self . tls_config . clone ( ) ,
13931390 )
13941391 . await
1395- . map_err ( |err| anyhow:: format_err!( "Failed to create who-is channel: {}" , err ) ) ?;
1392+ . map_err ( |err| anyhow:: format_err!( "Failed to create who-is channel: {err}" ) ) ?;
13961393
13971394 let uri = RaftClient :: new ( channel)
13981395 . who_is ( tonic:: Request :: new ( GrpcPeerId { id : peer_id } ) )
0 commit comments