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)`.
This commit is contained in:
Dylan M. Taylor committed 2026-11-16 21:54:47 -05:00
1 parent 08e922c020
commit 1901b2fac6
1 file changed
+1 -1
+1 -1
View File
@@ -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<Vec<String>> {
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 };