Fonts: line_split guard reads plainly (clippy)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-12 17:41:19 -04:00
co-authored by Claude Opus 5.5
parent ce5a88b785
commit f2db8f30e7
+1 -1
View File
@@ -451,7 +451,7 @@ fn line_split(f: &skrifa::FontRef, ascent: f64, descent: f64, upem: f64) -> f64
_ => (ascent, descent),
};
let total = a + d;
if !(total > 0.0) || !a.is_finite() || !d.is_finite() || a < 0.0 || d < 0.0 {
if !total.is_finite() || total <= 0.0 || a < 0.0 || d < 0.0 {
return 0.8;
}
if total > upem * 1.5 { 0.81 } else { (a / total).clamp(0.5, 1.0) }