text: Implement Rope::clip_offset in terms of the new utf8 boundary methods (#38630)

Release Notes:

- N/A
This commit is contained in:
Lukas Wirth
2025-09-22 11:45:23 +00:00
committed by GitHub
parent 50bd8bc255
commit 55dc9ff7ca
5 changed files with 12 additions and 26 deletions
+2 -2
View File
@@ -344,8 +344,8 @@ mod tests {
assert_eq!(conflicts_in_range.len(), 1);
// Test with a range that doesn't include any conflicts
let range = buffer.anchor_after(first_conflict_end.to_offset(&buffer) + 1)
..buffer.anchor_before(second_conflict_start.to_offset(&buffer) - 1);
let range = buffer.anchor_after(first_conflict_end.to_next_offset(&buffer))
..buffer.anchor_before(second_conflict_start.to_previous_offset(&buffer));
let conflicts_in_range = conflict_snapshot.conflicts_in_range(range, &snapshot);
assert_eq!(conflicts_in_range.len(), 0);
}