bevy/crates/bevy_ecs/src/system
Chris Russell c34a2c2fba
Query::get_many should not check for duplicates (#17724)
# Objective

Restore the behavior of `Query::get_many` prior to #15858.  

When passed duplicate `Entity`s, `get_many` is supposed to return
results for all of them, since read-only queries don't alias. However,
#15858 merged the implementation with `get_many_mut` and caused it to
return `QueryEntityError::AliasedMutability`.

## Solution

Introduce a new `Query::get_many_readonly` method that consumes the
`Query` like `get_many_inner`, but that is constrained to `D:
ReadOnlyQueryData` so that it can skip the aliasing check. Implement
`Query::get_many` in terms of that new method. Add a test, and a comment
explaining why it doesn't match the pattern of the other `&self`
methods.
2025-02-10 22:07:15 +00:00
..
commands Encapsulate cfg(feature = "track_location") in a type. (#17602) 2025-02-10 21:21:20 +00:00
adapter_system.rs Add no_std support to bevy_ecs (#16758) 2024-12-17 21:40:36 +00:00
builder.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
combinator.rs bevy_ecs: Apply #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] (#17335) 2025-01-14 21:37:41 +00:00
exclusive_function_system.rs bevy_ecs: Apply #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] (#17335) 2025-01-14 21:37:41 +00:00
exclusive_system_param.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
function_system.rs Improve docs for WorldQuery (#17654) 2025-02-03 22:13:42 +00:00
input.rs bevy_ecs: Apply #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] (#17335) 2025-01-14 21:37:41 +00:00
mod.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
observer_system.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
query.rs Query::get_many should not check for duplicates (#17724) 2025-02-10 22:07:15 +00:00
schedule_system.rs Convert to fallible system in IntoSystemConfigs (#17051) 2024-12-31 00:39:29 +00:00
system_name.rs Remove Implicit std Prelude from no_std Crates (#17086) 2025-01-03 01:58:43 +00:00
system_param.rs Encapsulate cfg(feature = "track_location") in a type. (#17602) 2025-02-10 21:21:20 +00:00
system_registry.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
system.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00