Scribble: the row loop's stop compares with partial_cmp (also stops on NaN; clippy)

This commit is contained in:
bflatastic
2026-10-24 04:49:07 +07:00
parent b59235e762
commit 028cafa52e
+1 -1
View File
@@ -189,7 +189,7 @@ pub fn scribble(path: &PathData, b: Rect, p: &Value) -> PathData {
// would never move it. // would never move it.
while row <= 2001 { while row <= 2001 {
let y = y0 + step / 2.0 + row as f64 * step; let y = y0 + step / 2.0 + row as f64 * step;
if !(y < y1) { if y.partial_cmp(&y1) != Some(std::cmp::Ordering::Less) {
break; break;
} }
let mut xs: Vec<f64> = vec![]; let mut xs: Vec<f64> = vec![];