Skip to content

Commit 929ef05

Browse files
committed
style: cargo fmt --all
1 parent 0e40788 commit 929ef05

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/causal_tree/expander.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,7 @@ impl DefaultTreeExpander {
199199
if state.side_effect_mode == SideEffectMode::ReadOnly {
200200
return false;
201201
}
202-
matches!(
203-
state.max_risk_level(),
204-
Some(RiskLevel::High | RiskLevel::Critical)
205-
)
202+
matches!(state.max_risk_level(), Some(RiskLevel::High | RiskLevel::Critical))
206203
}
207204
}
208205

@@ -327,7 +324,12 @@ impl TreeExpander for DefaultTreeExpander {
327324
// ---------------------------------------------------------------------------
328325

329326
#[cfg(test)]
330-
#[allow(clippy::indexing_slicing, clippy::unwrap_used, clippy::expect_used, clippy::needless_collect)]
327+
#[allow(
328+
clippy::indexing_slicing,
329+
clippy::unwrap_used,
330+
clippy::expect_used,
331+
clippy::needless_collect
332+
)]
331333
mod tests {
332334
use super::*;
333335
use crate::causal_tree::state::{BudgetState, RiskFlag};

src/causal_tree/policy.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ impl CircuitBreakerState {
135135
return false;
136136
}
137137
// If open, check whether the cooldown has elapsed.
138-
self.open_since
139-
.map_or(true, |opened_at| opened_at.elapsed().as_secs() < policy.circuit_breaker_cooldown_secs)
138+
self.open_since.map_or(true, |opened_at| {
139+
opened_at.elapsed().as_secs() < policy.circuit_breaker_cooldown_secs
140+
})
140141
}
141142

142143
/// Transition to the open state if the threshold has been reached.

0 commit comments

Comments
 (0)