From b5cefc0a991713341811029848b523b43b5f43b3 Mon Sep 17 00:00:00 2001 From: Dominik Grygiel Date: Mon, 19 Aug 2024 20:32:35 +0200 Subject: [PATCH] Fix fmt --- src/rpc/layout/history.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/rpc/layout/history.rs b/src/rpc/layout/history.rs index 157ef475..515eefad 100644 --- a/src/rpc/layout/history.rs +++ b/src/rpc/layout/history.rs @@ -226,12 +226,22 @@ impl LayoutHistory { // Add any new versions to history for v2 in other.old_versions.iter().chain(other.versions.iter()) { - if let Some(v1) = self.old_versions.iter().chain(self.versions.iter()).find(|v| v.version == v2.version) { + if let Some(v1) = self + .old_versions + .iter() + .chain(self.versions.iter()) + .find(|v| v.version == v2.version) + { // Version is already present, check consistency if v1 != v2 { error!("Inconsistent layout histories: different layout compositions for version {}. Your cluster will be broken as long as this layout version is not replaced.", v2.version); } - } else if self.old_versions.iter().chain(self.versions.iter()).all(|v| v.version != v2.version - 1) { + } else if self + .old_versions + .iter() + .chain(self.versions.iter()) + .all(|v| v.version != v2.version - 1) + { error!( "Cannot receive new layout version {}, version {} is missing", v2.version,