adapt to upstream changes

This commit is contained in:
Carter Anderson 2021-07-23 17:06:52 -07:00
parent 618c9e94f0
commit 955c79f299
3 changed files with 12 additions and 16 deletions

View file

@ -3,7 +3,7 @@ use bevy_ecs::{
component::{Component, ComponentDescriptor},
prelude::{FromWorld, IntoExclusiveSystem, IntoSystem},
schedule::{
RunOnce, Schedule, Stage, StageLabel, State, SystemDescriptor, SystemSet, SystemStage,
IntoSystemDescriptor, RunOnce, Schedule, Stage, StageLabel, State, SystemSet, SystemStage,
},
world::World,
};
@ -12,8 +12,6 @@ use std::{fmt::Debug, hash::Hash};
#[cfg(feature = "trace")]
use bevy_utils::tracing::info_span;
use std::fmt::Debug;
use std::hash::Hash;
#[allow(clippy::needless_doctest_main)]
/// Containers of app logic and data
@ -278,8 +276,7 @@ impl App {
stage_label: impl StageLabel,
system: impl IntoSystemDescriptor<Params>,
) -> &mut Self {
self.app
.schedule
self.schedule
.stage(CoreStage::Startup, |schedule: &mut Schedule| {
schedule.add_system_to_stage(stage_label, system)
});
@ -291,8 +288,7 @@ impl App {
stage_label: impl StageLabel,
system_set: SystemSet,
) -> &mut Self {
self.app
.schedule
self.schedule
.stage(CoreStage::Startup, |schedule: &mut Schedule| {
schedule.add_system_set_to_stage(stage_label, system_set)
});

View file

@ -291,7 +291,7 @@ pub struct 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);
}
}

View file

@ -825,14 +825,14 @@ unsafe impl<T: 'static> SystemParamState for OptionNonSendState<T> {
fn default_config() {}
}
impl<'a, T: 'static> SystemParamFetch<'a> for OptionNonSendState<T> {
type Item = Option<NonSend<'a, T>>;
impl<'s, 'w, T: 'static> SystemParamFetch<'s, 'w> for OptionNonSendState<T> {
type Item = Option<NonSend<'w, T>>;
#[inline]
unsafe fn get_param(
state: &'a mut Self,
state: &'s mut Self,
system_meta: &SystemMeta,
world: &'a World,
world: &'w World,
change_tick: u32,
) -> Self::Item {
world.validate_non_send_access::<T>();
@ -942,14 +942,14 @@ unsafe impl<T: 'static> SystemParamState for OptionNonSendMutState<T> {
fn default_config() {}
}
impl<'a, T: 'static> SystemParamFetch<'a> for OptionNonSendMutState<T> {
type Item = Option<NonSendMut<'a, T>>;
impl<'s, 'w, T: 'static> SystemParamFetch<'s, 'w> for OptionNonSendMutState<T> {
type Item = Option<NonSendMut<'w, T>>;
#[inline]
unsafe fn get_param(
state: &'a mut Self,
state: &'s mut Self,
system_meta: &SystemMeta,
world: &'a World,
world: &'w World,
change_tick: u32,
) -> Self::Item {
world.validate_non_send_access::<T>();