From 1901b2fac64f2c55103d2c0129d4857d88571f30 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 16 Nov 2026 21:54:47 -0500 Subject: [PATCH] docx: satisfy clippy's range-contains lint in the chart title guard main's gate fails here for every pull request: `!(r < 1.0 || r > 359.0)` is exactly what `manual_range_contains` rejects. Express the same range as `(1.0..=359.0).contains(&r)`. --- crates/docx/src/read/chart/plot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/docx/src/read/chart/plot.rs b/crates/docx/src/read/chart/plot.rs index 255b1c671..d70a67734 100644 --- a/crates/docx/src/read/chart/plot.rs +++ b/crates/docx/src/read/chart/plot.rs @@ -212,7 +212,7 @@ fn title_left(c: &Chart, cat_on: bool, val_on: bool, area_w: f32) -> f32 { fn flat_title_lines(c: &Chart, area_w: f32) -> Option> { let left = if c.horizontal { &c.cat } else { &c.val }; let r = left.title_rot?.rem_euclid(360.0); - if !(r < 1.0 || r > 359.0) { + if !(1.0..=359.0).contains(&r) { return None; } let width = if area_w.is_finite() { (area_w * 0.18).max(1.0) } else { 1.0 };