Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Remove ExclusiveSystemParam::apply #7489

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions crates/bevy_ecs/src/system/exclusive_function_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ where
}

#[inline]
fn apply_buffers(&mut self, world: &mut World) {
let param_state = self.param_state.as_mut().expect(PARAM_MESSAGE);
Param::apply(param_state, world);
fn apply_buffers(&mut self, _world: &mut World) {
// "pure" exclusive systems do not have any buffers to apply.
// Systems made by piping a normal system with an exclusive system
// might have buffers to apply, but this is handled by `PipeSystem`.
}

#[inline]
Expand Down
8 changes: 0 additions & 8 deletions crates/bevy_ecs/src/system/exclusive_system_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ pub trait ExclusiveSystemParam: Sized {
type Item<'s>: ExclusiveSystemParam<State = Self::State>;

fn init(world: &mut World, system_meta: &mut SystemMeta) -> Self::State;
#[inline]
fn apply(_state: &mut Self::State, _world: &mut World) {}

fn get_param<'s>(state: &'s mut Self::State, system_meta: &SystemMeta) -> Self::Item<'s>;
}
Expand Down Expand Up @@ -74,12 +72,6 @@ macro_rules! impl_exclusive_system_param_tuple {
(($($param::init(_world, _system_meta),)*))
}

#[inline]
fn apply(state: &mut Self::State, _world: &mut World) {
let ($($param,)*) = state;
$($param::apply($param, _world);)*
}

#[inline]
#[allow(clippy::unused_unit)]
fn get_param<'s>(
Expand Down