Skip to content

Commit 150266d

Browse files
committed
unify exclusive system params with normal system params
1 parent 477eb0a commit 150266d

File tree

9 files changed

+154
-542
lines changed

9 files changed

+154
-542
lines changed

crates/bevy_ecs/macros/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ pub fn impl_param_set(_input: TokenStream) -> TokenStream {
403403
change_tick,
404404
}
405405
}
406+
407+
fn is_exclusive() -> bool {
408+
false #(|| <#param as SystemParam>::is_exclusive())*
409+
}
406410
}
407411

408412
impl<'w, 's, #(#param: SystemParam,)*> ParamSet<'w, 's, (#(#param,)*)>

crates/bevy_ecs/src/schedule/set.rs

+1-18
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ pub use bevy_ecs_macros::{ScheduleLabel, SystemSet};
1111
use crate::{
1212
define_label,
1313
intern::Interned,
14-
system::{
15-
ExclusiveFunctionSystem, ExclusiveSystemParamFunction, FunctionSystem,
16-
IsExclusiveFunctionSystem, IsFunctionSystem, SystemParamFunction,
17-
},
14+
system::{FunctionSystem, IsFunctionSystem, SystemParamFunction},
1815
};
1916

2017
define_label!(
@@ -187,20 +184,6 @@ where
187184
}
188185
}
189186

190-
// exclusive systems
191-
impl<Marker, F> IntoSystemSet<(IsExclusiveFunctionSystem, Marker)> for F
192-
where
193-
Marker: 'static,
194-
F: ExclusiveSystemParamFunction<Marker>,
195-
{
196-
type Set = SystemTypeSet<ExclusiveFunctionSystem<Marker, F>>;
197-
198-
#[inline]
199-
fn into_system_set(self) -> Self::Set {
200-
SystemTypeSet::<ExclusiveFunctionSystem<Marker, F>>::new()
201-
}
202-
}
203-
204187
#[cfg(test)]
205188
mod tests {
206189
use crate::{

crates/bevy_ecs/src/system/exclusive_function_system.rs

-330
This file was deleted.

0 commit comments

Comments
 (0)