Skip to content

Commit

Permalink
Simple cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-i-cecile committed Jan 18, 2023
1 parent d0d21a0 commit 53c1502
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 17 deletions.
8 changes: 2 additions & 6 deletions crates/bevy_ecs/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,7 @@ pub fn derive_run_criteria_label(input: TokenStream) -> TokenStream {
pub fn derive_schedule_label(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as DeriveInput);
let mut trait_path = bevy_ecs_path();
trait_path
.segments
.push(format_ident!("schedule_v3").into());
trait_path.segments.push(format_ident!("schedule").into());
trait_path
.segments
.push(format_ident!("ScheduleLabel").into());
Expand All @@ -586,9 +584,7 @@ pub fn derive_schedule_label(input: TokenStream) -> TokenStream {
pub fn derive_system_set(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as DeriveInput);
let mut trait_path = bevy_ecs_path();
trait_path
.segments
.push(format_ident!("schedule_v3").into());
trait_path.segments.push(format_ident!("schedule").into());
trait_path.segments.push(format_ident!("SystemSet").into());
derive_set(input, &trait_path)
}
Expand Down
5 changes: 1 addition & 4 deletions crates/bevy_ecs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ pub mod prelude {
entity::Entity,
event::{EventReader, EventWriter, Events},
query::{Added, AnyOf, ChangeTrackers, Changed, Or, QueryState, With, Without},
schedule::{
IntoSystemDescriptor, RunCriteria, RunCriteriaDescriptorCoercion, RunCriteriaLabel,
Schedule, Stage, StageLabel, State, SystemLabel, SystemSet, SystemStage,
},
schedule::{Schedule, State, SystemSet},
system::{
adapter as system_adapter,
adapter::{dbg, error, ignore, info, unwrap, warn},
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/schedule/executor/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
world::World,
};

/// A variant of [`SingleThreadedExecutor`](crate::schedule_v3::SingleThreadedExecutor) that calls
/// A variant of [`SingleThreadedExecutor`](crate::schedule::SingleThreadedExecutor) that calls
/// [`apply_buffers`](crate::system::System::apply_buffers) immediately after running each system.
#[derive(Default)]
pub struct SimpleExecutor {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/schedule/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::hash::Hash;
use std::mem;

use crate as bevy_ecs;
use crate::schedule::{ScheduleLabel, SystemSet, WorldExt};
use crate::schedule::{ScheduleLabel, SystemSet};
use crate::system::Resource;
use crate::world::World;

Expand Down
1 change: 0 additions & 1 deletion crates/bevy_ecs/src/system/exclusive_function_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use crate::{
change_detection::MAX_CHANGE_AGE,
component::ComponentId,
query::Access,
schedule::{SystemLabel, SystemLabelId},
system::{
check_system_change_tick, AsSystemLabel, ExclusiveSystemParam, ExclusiveSystemParamItem,
In, InputMarker, IntoSystem, System, SystemMeta, SystemTypeIdLabel,
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_ecs/src/system/function_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use crate::{
component::ComponentId,
prelude::FromWorld,
query::{Access, FilteredAccessSet},
schedule::{SystemLabel, SystemLabelId},
system::{check_system_change_tick, ReadOnlySystemParam, System, SystemParam, SystemParamItem},
world::{World, WorldId},
};
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub trait System: Send + Sync + 'static {
fn default_labels(&self) -> Vec<SystemLabelId> {
Vec::new()
}
/// Returns the system's default [system sets](crate::schedule_v3::SystemSet).
/// Returns the system's default [system sets](crate::schedule::SystemSet).
fn default_system_sets(&self) -> Vec<Box<dyn crate::schedule::SystemSet>> {
Vec::new()
}
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{
event::{Event, Events},
ptr::UnsafeCellDeref,
query::{DebugCheckedUnwrap, QueryState, ReadOnlyWorldQuery, WorldQuery},
schedule::Schedules,
schedule::{ScheduleLabel, Schedules},
storage::{Column, ComponentSparseSet, ResourceData, SparseSet, Storages, TableRow},
system::Resource,
};
Expand Down Expand Up @@ -1976,7 +1976,7 @@ impl World {
// Scheduling-related methods
impl World {
/// Runs the schedule with the provided `label` on the world a single time.
fn run_schedule(&mut self, label: impl ScheduleLabel) {
pub fn run_schedule(&mut self, label: impl ScheduleLabel) {
if let Some(mut schedule) = self.resource_mut::<Schedules>().remove(&label) {
schedule.run(self);
self.resource_mut::<Schedules>().insert(label, schedule);
Expand Down

0 comments on commit 53c1502

Please sign in to comment.