Skip to content

Commit

Permalink
adapt to upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cart committed Jul 24, 2021
1 parent 1e79aa8 commit 05bd717
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
10 changes: 3 additions & 7 deletions crates/bevy_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -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
Expand Down Expand Up @@ -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)
});
Expand All @@ -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)
});
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
16 changes: 8 additions & 8 deletions crates/bevy_ecs/src/system/system_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down Expand Up @@ -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>();
Expand Down

0 comments on commit 05bd717

Please sign in to comment.