adapt to upstream changes
This commit is contained in:
parent
618c9e94f0
commit
955c79f299
@ -3,7 +3,7 @@ use bevy_ecs::{
|
|||||||
component::{Component, ComponentDescriptor},
|
component::{Component, ComponentDescriptor},
|
||||||
prelude::{FromWorld, IntoExclusiveSystem, IntoSystem},
|
prelude::{FromWorld, IntoExclusiveSystem, IntoSystem},
|
||||||
schedule::{
|
schedule::{
|
||||||
RunOnce, Schedule, Stage, StageLabel, State, SystemDescriptor, SystemSet, SystemStage,
|
IntoSystemDescriptor, RunOnce, Schedule, Stage, StageLabel, State, SystemSet, SystemStage,
|
||||||
},
|
},
|
||||||
world::World,
|
world::World,
|
||||||
};
|
};
|
||||||
@ -12,8 +12,6 @@ use std::{fmt::Debug, hash::Hash};
|
|||||||
|
|
||||||
#[cfg(feature = "trace")]
|
#[cfg(feature = "trace")]
|
||||||
use bevy_utils::tracing::info_span;
|
use bevy_utils::tracing::info_span;
|
||||||
use std::fmt::Debug;
|
|
||||||
use std::hash::Hash;
|
|
||||||
|
|
||||||
#[allow(clippy::needless_doctest_main)]
|
#[allow(clippy::needless_doctest_main)]
|
||||||
/// Containers of app logic and data
|
/// Containers of app logic and data
|
||||||
@ -278,8 +276,7 @@ impl App {
|
|||||||
stage_label: impl StageLabel,
|
stage_label: impl StageLabel,
|
||||||
system: impl IntoSystemDescriptor<Params>,
|
system: impl IntoSystemDescriptor<Params>,
|
||||||
) -> &mut Self {
|
) -> &mut Self {
|
||||||
self.app
|
self.schedule
|
||||||
.schedule
|
|
||||||
.stage(CoreStage::Startup, |schedule: &mut Schedule| {
|
.stage(CoreStage::Startup, |schedule: &mut Schedule| {
|
||||||
schedule.add_system_to_stage(stage_label, system)
|
schedule.add_system_to_stage(stage_label, system)
|
||||||
});
|
});
|
||||||
@ -291,8 +288,7 @@ impl App {
|
|||||||
stage_label: impl StageLabel,
|
stage_label: impl StageLabel,
|
||||||
system_set: SystemSet,
|
system_set: SystemSet,
|
||||||
) -> &mut Self {
|
) -> &mut Self {
|
||||||
self.app
|
self.schedule
|
||||||
.schedule
|
|
||||||
.stage(CoreStage::Startup, |schedule: &mut Schedule| {
|
.stage(CoreStage::Startup, |schedule: &mut Schedule| {
|
||||||
schedule.add_system_set_to_stage(stage_label, system_set)
|
schedule.add_system_set_to_stage(stage_label, system_set)
|
||||||
});
|
});
|
||||||
|
@ -291,7 +291,7 @@ pub struct GetOrSpawn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Command for GetOrSpawn {
|
impl Command for GetOrSpawn {
|
||||||
fn write(self: Box<Self>, world: &mut World) {
|
fn write(self, world: &mut World) {
|
||||||
world.get_or_spawn(self.entity);
|
world.get_or_spawn(self.entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -825,14 +825,14 @@ unsafe impl<T: 'static> SystemParamState for OptionNonSendState<T> {
|
|||||||
fn default_config() {}
|
fn default_config() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, T: 'static> SystemParamFetch<'a> for OptionNonSendState<T> {
|
impl<'s, 'w, T: 'static> SystemParamFetch<'s, 'w> for OptionNonSendState<T> {
|
||||||
type Item = Option<NonSend<'a, T>>;
|
type Item = Option<NonSend<'w, T>>;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn get_param(
|
unsafe fn get_param(
|
||||||
state: &'a mut Self,
|
state: &'s mut Self,
|
||||||
system_meta: &SystemMeta,
|
system_meta: &SystemMeta,
|
||||||
world: &'a World,
|
world: &'w World,
|
||||||
change_tick: u32,
|
change_tick: u32,
|
||||||
) -> Self::Item {
|
) -> Self::Item {
|
||||||
world.validate_non_send_access::<T>();
|
world.validate_non_send_access::<T>();
|
||||||
@ -942,14 +942,14 @@ unsafe impl<T: 'static> SystemParamState for OptionNonSendMutState<T> {
|
|||||||
fn default_config() {}
|
fn default_config() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, T: 'static> SystemParamFetch<'a> for OptionNonSendMutState<T> {
|
impl<'s, 'w, T: 'static> SystemParamFetch<'s, 'w> for OptionNonSendMutState<T> {
|
||||||
type Item = Option<NonSendMut<'a, T>>;
|
type Item = Option<NonSendMut<'w, T>>;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn get_param(
|
unsafe fn get_param(
|
||||||
state: &'a mut Self,
|
state: &'s mut Self,
|
||||||
system_meta: &SystemMeta,
|
system_meta: &SystemMeta,
|
||||||
world: &'a World,
|
world: &'w World,
|
||||||
change_tick: u32,
|
change_tick: u32,
|
||||||
) -> Self::Item {
|
) -> Self::Item {
|
||||||
world.validate_non_send_access::<T>();
|
world.validate_non_send_access::<T>();
|
||||||
|
Loading…
Reference in New Issue
Block a user