Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

style: cargo fmt preset_fallback.rs

Louis Beaumont8c7dd7881e20
diff --git a/crates/screenpipe-core/src/pipes/preset_fallback.rs b/crates/screenpipe-core/src/pipes/preset_fallback.rs
index 204b5430a..85c3bb62d 100644
--- a/crates/screenpipe-core/src/pipes/preset_fallback.rs
+++ b/crates/screenpipe-core/src/pipes/preset_fallback.rs
@@ -541,9 +541,18 @@ mod tests {
"third".to_string(),
];
- assert_eq!(registry.pick_preset_with_floor(&presets, 0), Some(("primary", 0)));
- assert_eq!(registry.pick_preset_with_floor(&presets, 1), Some(("fallback", 1)));
- assert_eq!(registry.pick_preset_with_floor(&presets, 2), Some(("third", 2)));
+ assert_eq!(
+ registry.pick_preset_with_floor(&presets, 0),
+ Some(("primary", 0))
+ );
+ assert_eq!(
+ registry.pick_preset_with_floor(&presets, 1),
+ Some(("fallback", 1))
+ );
+ assert_eq!(
+ registry.pick_preset_with_floor(&presets, 2),
+ Some(("third", 2))
+ );
}
#[test]
@@ -552,7 +561,10 @@ mod tests {
let presets = vec!["primary".to_string(), "fallback".to_string()];
// Floor beyond the last index clamps to the last preset rather than
// returning None / panicking.
- assert_eq!(registry.pick_preset_with_floor(&presets, 9), Some(("fallback", 1)));
+ assert_eq!(
+ registry.pick_preset_with_floor(&presets, 9),
+ Some(("fallback", 1))
+ );
}
#[test]
@@ -566,8 +578,14 @@ mod tests {
// Trip the fallback's breaker; from floor 1 it should be skipped to
// "third", while floor 0 still returns the (closed) primary.
registry.record_failure("fallback", Some("rate_limited"));
- assert_eq!(registry.pick_preset_with_floor(&presets, 0), Some(("primary", 0)));
- assert_eq!(registry.pick_preset_with_floor(&presets, 1), Some(("third", 2)));
+ assert_eq!(
+ registry.pick_preset_with_floor(&presets, 0),
+ Some(("primary", 0))
+ );
+ assert_eq!(
+ registry.pick_preset_with_floor(&presets, 1),
+ Some(("third", 2))
+ );
}
#[test]