mirror of
https://github.com/bevyengine/bevy
synced 2024-12-18 17:13:10 +00:00
fix QueryIter::sort_unstable_by (#16565)
# Objective `QueryIter::sort_unstable_by` is mistakenly using `slice::sort_by`. ## Solution Use `slice::sort_unstable_by`.
This commit is contained in:
parent
89d094e50f
commit
eaa7dfedea
1 changed files with 1 additions and 1 deletions
|
@ -774,7 +774,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> {
|
|||
)
|
||||
};
|
||||
let mut keyed_query: Vec<_> = query_lens.collect();
|
||||
keyed_query.sort_by(|(key_1, _), (key_2, _)| compare(key_1, key_2));
|
||||
keyed_query.sort_unstable_by(|(key_1, _), (key_2, _)| compare(key_1, key_2));
|
||||
let entity_iter = keyed_query.into_iter().map(|(.., entity)| entity);
|
||||
// SAFETY:
|
||||
// `self.world` has permission to access the required components.
|
||||
|
|
Loading…
Reference in a new issue