diff --git a/crates/bevy_ecs/src/change_detection.rs b/crates/bevy_ecs/src/change_detection.rs index 93ae4c1ca765c5..ed3834e05fde92 100644 --- a/crates/bevy_ecs/src/change_detection.rs +++ b/crates/bevy_ecs/src/change_detection.rs @@ -146,7 +146,7 @@ pub trait DetectChangesMut: DetectChanges { /// } /// # let mut world = World::new(); /// # world.insert_resource(Score(1)); - /// # let mut score_changed = IntoSystem::into_system(resource_changed::()); + /// # let mut score_changed = IntoSystem::into_system(resource_changed::); /// # score_changed.initialize(&mut world); /// # score_changed.run((), &mut world); /// # @@ -210,11 +210,11 @@ pub trait DetectChangesMut: DetectChanges { /// # let mut world = World::new(); /// # world.insert_resource(Events::::default()); /// # world.insert_resource(Score(1)); - /// # let mut score_changed = IntoSystem::into_system(resource_changed::()); + /// # let mut score_changed = IntoSystem::into_system(resource_changed::); /// # score_changed.initialize(&mut world); /// # score_changed.run((), &mut world); /// # - /// # let mut score_changed_event = IntoSystem::into_system(on_event::()); + /// # let mut score_changed_event = IntoSystem::into_system(on_event::); /// # score_changed_event.initialize(&mut world); /// # score_changed_event.run((), &mut world); /// # diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs index ea1c1380dd55b9..24cebf993bb68c 100644 --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -107,7 +107,7 @@ pub trait Condition: sealed::Condition { /// # fn my_system() {} /// app.add_systems( /// // `resource_equals` will only get run if the resource `R` exists. - /// my_system.run_if(resource_exists::().and_then(resource_equals(R(0)))), + /// my_system.run_if(resource_exists::.and_then(resource_equals(R(0)))), /// ); /// # app.run(&mut world); /// ``` @@ -145,7 +145,7 @@ pub trait Condition: sealed::Condition { /// # fn my_system(mut c: ResMut) { c.0 = true; } /// app.add_systems( /// // Only run the system if either `A` or `B` exist. - /// my_system.run_if(resource_exists::().or_else(resource_exists::())), + /// my_system.run_if(resource_exists::.or_else(resource_exists::)), /// ); /// # /// # world.insert_resource(C(false)); @@ -258,7 +258,7 @@ pub mod common_conditions { /// # let mut world = World::new(); /// app.add_systems( /// // `resource_exists` will only return true if the given resource exists in the world - /// my_system.run_if(resource_exists::()), + /// my_system.run_if(resource_exists::), /// ); /// /// fn my_system(mut counter: ResMut) { @@ -379,7 +379,7 @@ pub mod common_conditions { /// app.add_systems( /// // `resource_added` will only return true if the /// // given resource was just added - /// my_system.run_if(resource_added::()), + /// my_system.run_if(resource_added::), /// ); /// /// fn my_system(mut counter: ResMut) { @@ -431,11 +431,11 @@ pub mod common_conditions { /// // `resource_changed` will only return true if the /// // given resource was just changed (or added) /// my_system.run_if( - /// resource_changed::() + /// resource_changed:: /// // By default detecting changes will also trigger if the resource was /// // just added, this won't work with my example so I will add a second /// // condition to make sure the resource wasn't just added - /// .and_then(not(resource_added::())) + /// .and_then(not(resource_added::)) /// ), /// ); /// @@ -484,11 +484,11 @@ pub mod common_conditions { /// // `resource_exists_and_changed` will only return true if the /// // given resource exists and was just changed (or added) /// my_system.run_if( - /// resource_exists_and_changed::() + /// resource_exists_and_changed:: /// // By default detecting changes will also trigger if the resource was /// // just added, this won't work with my example so I will add a second /// // condition to make sure the resource wasn't just added - /// .and_then(not(resource_added::())) + /// .and_then(not(resource_added::)) /// ), /// ); /// @@ -546,11 +546,11 @@ pub mod common_conditions { /// // `resource_changed_or_removed` will only return true if the /// // given resource was just changed or removed (or added) /// my_system.run_if( - /// resource_changed_or_removed::() + /// resource_changed_or_removed:: /// // By default detecting changes will also trigger if the resource was /// // just added, this won't work with my example so I will add a second /// // condition to make sure the resource wasn't just added - /// .and_then(not(resource_added::())) + /// .and_then(not(resource_added::)) /// ), /// ); /// @@ -677,7 +677,7 @@ pub mod common_conditions { /// app.add_systems( /// // `state_exists` will only return true if the /// // given state exists - /// my_system.run_if(state_exists::()), + /// my_system.run_if(state_exists::), /// ); /// /// fn my_system(mut counter: ResMut) { @@ -845,7 +845,7 @@ pub mod common_conditions { /// // `state_changed` will only return true if the /// // given states value has just been updated or /// // the state has just been added - /// my_system.run_if(state_changed::()), + /// my_system.run_if(state_changed::), /// ); /// /// fn my_system(mut counter: ResMut) { @@ -927,7 +927,7 @@ pub mod common_conditions { /// # let mut world = World::new(); /// # world.init_resource::(); /// app.add_systems( - /// my_system.run_if(any_with_component::()), + /// my_system.run_if(any_with_component::), /// ); /// /// #[derive(Component)]