Fix panic in benches caused by missing resources (#16956)

# Objective

- To fix the benches panicking on `main`

## Solution

- It appears that systems requiring access to a non-existing `Res` now
causes a panic
- Some of the benches run systems that access resources that have not
been inserted into the world
- I have made it so that those resources are inserted into the world

## Testing

- I ran all the ecs benches and they all run without panicking

Co-authored-by: Oliver Maskery <oliver@wellplayed.games>
This commit is contained in:
Oliver Maskery 2024-12-24 17:18:03 +00:00 committed by GitHub
parent f96653498b
commit a7ae0807ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,8 @@ pub fn dyn_param(criterion: &mut Criterion) {
#[derive(Resource)]
struct R;
world.insert_resource(R);
let mut schedule = Schedule::default();
let system = (
DynParamBuilder::new::<Res<R>>(ParamBuilder),

View File

@ -11,6 +11,8 @@ pub fn param_set(criterion: &mut Criterion) {
#[derive(Resource)]
struct R;
world.insert_resource(R);
let mut schedule = Schedule::default();
schedule.add_systems(
|_: ParamSet<(