Use saturating_as

This commit is contained in:
mkorje 2025-06-10 20:52:43 +10:00
parent 4ad6b4fc64
commit eebe26ea83
No known key found for this signature in database

View File

@ -1,5 +1,6 @@
use std::fmt::{self, Debug, Formatter};
use az::SaturatingAs;
use rustybuzz::{BufferFlags, UnicodeBuffer};
use ttf_parser::math::{GlyphAssembly, GlyphConstruction, GlyphPart};
use ttf_parser::GlyphId;
@ -328,7 +329,7 @@ impl GlyphFragment {
x_offset: Em::zero(),
y_advance: Em::zero(),
y_offset: Em::zero(),
range: 0..str.len() as u16,
range: 0..str.len().saturating_as(),
span: (span, 0),
}],
};