Skip to content

Commit e12e3b8

Browse files
committed
fix(site-api): clippy map_or + allow prism_window length
1 parent bf6ab1f commit e12e3b8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/site-api/src/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ fn telemetry_x(point: &PrismTelemetryPoint) -> u32 {
581581
/// Params prefer telemetry `n_params`, then the list-row `n_params` so
582582
/// historical runs still surface a measured size when the detail blob is thin.
583583
#[must_use]
584+
#[allow(clippy::too_many_lines)]
584585
pub fn prism_window(
585586
recipe: Option<&Value>,
586587
status: Option<&Value>,
@@ -616,8 +617,7 @@ pub fn prism_window(
616617
let param_ceiling = recipe
617618
.and_then(|r| r.get("max_params"))
618619
.and_then(Value::as_u64)
619-
.map(|p| p / 1_000_000)
620-
.unwrap_or(0);
620+
.map_or(0, |p| p / 1_000_000);
621621
let mut series: Vec<(f64, LossSeries)> = Vec::new();
622622
for row in subs {
623623
if row.get("status").and_then(Value::as_str) != Some("terminated") {

0 commit comments

Comments
 (0)