From da3fd83aa7bce0fc259520a92b2d759b178fed01 Mon Sep 17 00:00:00 2001 From: overtrue Date: Sat, 22 Aug 2026 07:53:11 +0800 Subject: [PATCH] style: cargo fmt --- crates/data-usage/src/data_usage.rs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/crates/data-usage/src/data_usage.rs b/crates/data-usage/src/data_usage.rs index 8950b37a8..81a313125 100644 --- a/crates/data-usage/src/data_usage.rs +++ b/crates/data-usage/src/data_usage.rs @@ -2996,7 +2996,9 @@ mod tests { fn replication_target_deserialization_preserves_large_historical_maps() { let mut stats = ReplicationAllStats::default(); for index in 0..=1024 { - stats.targets.insert(format!("target-{index}"), ReplicationTargetUsage::default()); + stats + .targets + .insert(format!("target-{index}"), ReplicationTargetUsage::default()); } let encoded = rmp_serde::to_vec_named(&stats).expect("large replication target fixture should encode"); let decoded = rmp_serde::from_slice::(&encoded) @@ -3026,8 +3028,7 @@ mod tests { }; let buf = rmp_serde::to_vec_named(&original).expect("encode ReplicationTargetUsage to msgpack"); - let decoded: ReplicationTargetUsage = - rmp_serde::from_slice(&buf).expect("decode ReplicationTargetUsage from msgpack"); + let decoded: ReplicationTargetUsage = rmp_serde::from_slice(&buf).expect("decode ReplicationTargetUsage from msgpack"); assert_eq!(original, decoded, "round-trip through rmp must preserve every field"); // Also verify that encoding as an unnamed sequence and then decoding @@ -3037,8 +3038,14 @@ mod tests { let named_str = String::from_utf8_lossy(&named_buf); assert!(named_str.contains("pending_size"), "field 'pending_size' must survive the rename"); assert!(named_str.contains("replicated_size"), "field 'replicated_size' must survive the rename"); - assert!(named_str.contains("missed_threshold_size"), "field 'missed_threshold_size' must survive the rename"); - assert!(named_str.contains("after_threshold_count"), "field 'after_threshold_count' must survive the rename"); + assert!( + named_str.contains("missed_threshold_size"), + "field 'missed_threshold_size' must survive the rename" + ); + assert!( + named_str.contains("after_threshold_count"), + "field 'after_threshold_count' must survive the rename" + ); } #[test]