Update turtle-lib/src/general/fontsize.rs

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
2026-09-19 11:58:17 +02:00
committed by GitHub
co-authored by greptile-apps[bot]
parent 68593ba64d
commit a5261feca3
+1 -1
View File
@@ -49,7 +49,7 @@ impl From<f64> for FontSize {
impl From<usize> for FontSize {
fn from(size: usize) -> Self {
Self((size as u16).max(1))
Self(u16::try_from(size).unwrap_or(u16::MAX).max(1))
}
}