Swap TransparentUi to use a stable sort (#9598)

# Objective

- Fix the `borders`, `ui` and `text_wrap_debug` examples.

## Solution

- Swap `TransparentUi` to use a stable sort

---

This is the smallest change to fix the examples but ideally this is
fixed by setting better sort keys for the UI elements such that we can
swap back to an unstable sort.
This commit is contained in:
James O'Brien 2023-08-27 13:37:17 -07:00 committed by GitHub
parent 7b6f8659f8
commit aa489eced0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,6 +112,11 @@ impl PhaseItem for TransparentUi {
self.draw_function
}
#[inline]
fn sort(items: &mut [Self]) {
items.sort_by_key(|item| item.sort_key());
}
#[inline]
fn batch_size(&self) -> usize {
self.batch_size