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:
parent
f96653498b
commit
a7ae0807ac
@ -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),
|
||||
|
@ -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<(
|
||||
|
Loading…
Reference in New Issue
Block a user