mirror of
https://github.com/servo/servo
synced 2026-05-09 08:32:31 +02:00
Servo `Range` type probably predates the `Range` type in the standard library. The fact that there are two `Range` types in Servo is often very confusing. The internal type is only used for byte indices in glyph runs. This change removes the internal generic `Range` in favor of a small wrapper around a native Rust `Range`. It's likely that there are more improvements that could be done here, such as reusing `Utf8CodePointIndex`, but this code is going to change a lot soon and these ranges might soon be replaced with actual glyph ranges. We are going to be looking to remove `TextByteRange` entirely. This is just an intermediate step. Testing: This should not change behavior and is thus covered by existing tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com>