bevy/crates/bevy_ecs/src
databasedav 95470df3c8
fix .insert_related index bound (#19134)
# Objective

resolves #19092

## Solution

- remove the `.saturating_sub` from the index transformation
- add `.saturating_add` to the internal offset calculation

## Testing

- added regression test, confirming 0 index order + testing max bound
2025-05-09 17:10:54 +00:00
..
entity Track spawn Tick of entities, offer methods, query data SpawnDetails and query filter Spawned (#19047) 2025-05-08 14:57:33 +00:00
error Use never_say_never hack to work around Rust 2024 regression for fn traits (#18804) 2025-04-14 19:59:48 +00:00
event Deprecated Begone! 0.16 Cleanup (#19108) 2025-05-07 18:17:41 +00:00
observer Make entity::index non max (#18704) 2025-05-07 18:20:30 +00:00
query Track spawn Tick of entities, offer methods, query data SpawnDetails and query filter Spawned (#19047) 2025-05-08 14:57:33 +00:00
reflect Replace VisitEntities with MapEntities (#18432) 2025-03-21 00:18:10 +00:00
relationship fix .insert_related index bound (#19134) 2025-05-09 17:10:54 +00:00
schedule Deprecated Begone! 0.16 Cleanup (#19108) 2025-05-07 18:17:41 +00:00
storage Make entity::index non max (#18704) 2025-05-07 18:20:30 +00:00
system Track spawn Tick of entities, offer methods, query data SpawnDetails and query filter Spawned (#19047) 2025-05-08 14:57:33 +00:00
world Track spawn Tick of entities, offer methods, query data SpawnDetails and query filter Spawned (#19047) 2025-05-08 14:57:33 +00:00
archetype.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
batching.rs Fix *most* clippy lints (#15906) 2024-10-14 20:52:35 +00:00
bundle.rs Track spawn Tick of entities, offer methods, query data SpawnDetails and query filter Spawned (#19047) 2025-05-08 14:57:33 +00:00
change_detection.rs Expose the added tick for change detection, both getting and setting. (#18746) 2025-04-08 21:13:27 +00:00
component.rs Deprecated Begone! 0.16 Cleanup (#19108) 2025-05-07 18:17:41 +00:00
entity_disabling.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
hierarchy.rs fix .insert_related index bound (#19134) 2025-05-09 17:10:54 +00:00
intern.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
label.rs do_not_recommend interned Labels (#17950) 2025-02-25 23:46:21 +00:00
lib.rs Make entity generation a new type and remove identifier (#19121) 2025-05-08 04:03:05 +00:00
name.rs Make entity generation a new type and remove identifier (#19121) 2025-05-08 04:03:05 +00:00
never.rs Use never_say_never hack to work around Rust 2024 regression for fn traits (#18804) 2025-04-14 19:59:48 +00:00
removal_detection.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
resource.rs Move Resource trait to its own file (#17469) 2025-01-21 19:47:08 +00:00
spawn.rs Increase upper limit of children! (#18865) 2025-05-06 00:58:30 +00:00
traversal.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00