diff options
| author | tv <tv@krebsco.de> | 2026-10-26 21:56:20 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-26 21:56:20 +0100 |
| commit | f937094b9c585b0b1f1f404ee1f962d97dcc2e80 (patch) | |
| tree | 3c4e5ba952c6babc5fee757995f838ba2deb909b /src/remake/catchup.rs | |
| parent | 7dc2b728ca868ec7ed5f7b72eef43b0a0087ae04 (diff) | |
make clippy happy again
Diffstat (limited to 'src/remake/catchup.rs')
| -rw-r--r-- | src/remake/catchup.rs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/remake/catchup.rs b/src/remake/catchup.rs index b00a210..0be7dfd 100644 --- a/src/remake/catchup.rs +++ b/src/remake/catchup.rs @@ -67,14 +67,14 @@ pub(super) async fn check<H: Host>(host: &H) { } if host.initial_sync_done() { finish(host).await; - } else if started.elapsed() > timeout { - if let Some(rejoin) = host.remake().take_rejoin() { - let reason = format!( - "no peer on {target} completed a sync within {}s", - timeout.as_secs() - ); - abandon(host, rejoin, reason).await; - } + } else if started.elapsed() > timeout + && let Some(rejoin) = host.remake().take_rejoin() + { + let reason = format!( + "no peer on {target} completed a sync within {}s", + timeout.as_secs() + ); + abandon(host, rejoin, reason).await; } return; } @@ -253,6 +253,9 @@ enum Plan { }, } +// Every variant holds a whole document; one value lives for one step of a rejoin, so +// boxing would only add an indirection. +#[allow(clippy::large_enum_variant)] enum Prepared { /// Caught up with someone, but not with the target epoch yet: keep waiting. NotYet(AutoCommit), |
