summaryrefslogtreecommitdiffstats
path: root/src/remake/catchup.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 21:56:20 +0100
committertv <tv@krebsco.de>2026-10-26 21:56:20 +0100
commit08f5df1f0a2e22876a5b49a4f9e2e05a61df882a (patch)
tree113050df0bef5e8f3e9d188c69fc2a0c76d2eb17 /src/remake/catchup.rs
parentecdb3ee944f5c171faac3a71117e2ff27e064295 (diff)
make clippy happy again
Diffstat (limited to 'src/remake/catchup.rs')
-rw-r--r--src/remake/catchup.rs19
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),