@@ -61,12 +61,12 @@ impl Default for BoxedRunCriteria {
61
61
}
62
62
63
63
impl BoxedRunCriteria {
64
- pub fn set ( & mut self , criteria_system : BoxedSystem < ( ) , ShouldRun > ) {
64
+ pub ( crate ) fn set ( & mut self , criteria_system : BoxedSystem < ( ) , ShouldRun > ) {
65
65
self . criteria_system = Some ( criteria_system) ;
66
66
self . initialized = false ;
67
67
}
68
68
69
- pub fn should_run ( & mut self , world : & mut World ) -> ShouldRun {
69
+ pub ( crate ) fn should_run ( & mut self , world : & mut World ) -> ShouldRun {
70
70
if let Some ( ref mut run_criteria) = self . criteria_system {
71
71
if !self . initialized {
72
72
run_criteria. initialize ( world) ;
@@ -99,16 +99,16 @@ pub(crate) enum RunCriteriaInner {
99
99
}
100
100
101
101
pub ( crate ) struct RunCriteriaContainer {
102
- pub should_run : ShouldRun ,
103
- pub inner : RunCriteriaInner ,
104
- pub label : Option < BoxedRunCriteriaLabel > ,
105
- pub before : Vec < BoxedRunCriteriaLabel > ,
106
- pub after : Vec < BoxedRunCriteriaLabel > ,
102
+ pub ( crate ) should_run : ShouldRun ,
103
+ pub ( crate ) inner : RunCriteriaInner ,
104
+ pub ( crate ) label : Option < BoxedRunCriteriaLabel > ,
105
+ pub ( crate ) before : Vec < BoxedRunCriteriaLabel > ,
106
+ pub ( crate ) after : Vec < BoxedRunCriteriaLabel > ,
107
107
archetype_generation : ArchetypeGeneration ,
108
108
}
109
109
110
110
impl RunCriteriaContainer {
111
- pub fn from_descriptor ( descriptor : RunCriteriaDescriptor ) -> Self {
111
+ pub ( crate ) fn from_descriptor ( descriptor : RunCriteriaDescriptor ) -> Self {
112
112
Self {
113
113
should_run : ShouldRun :: Yes ,
114
114
inner : match descriptor. system {
@@ -122,21 +122,21 @@ impl RunCriteriaContainer {
122
122
}
123
123
}
124
124
125
- pub fn name ( & self ) -> Cow < ' static , str > {
125
+ pub ( crate ) fn name ( & self ) -> Cow < ' static , str > {
126
126
match & self . inner {
127
127
RunCriteriaInner :: Single ( system) => system. name ( ) ,
128
128
RunCriteriaInner :: Piped { system, .. } => system. name ( ) ,
129
129
}
130
130
}
131
131
132
- pub fn initialize ( & mut self , world : & mut World ) {
132
+ pub ( crate ) fn initialize ( & mut self , world : & mut World ) {
133
133
match & mut self . inner {
134
134
RunCriteriaInner :: Single ( system) => system. initialize ( world) ,
135
135
RunCriteriaInner :: Piped { system, .. } => system. initialize ( world) ,
136
136
}
137
137
}
138
138
139
- pub fn update_archetypes ( & mut self , world : & World ) {
139
+ pub ( crate ) fn update_archetypes ( & mut self , world : & World ) {
140
140
let archetypes = world. archetypes ( ) ;
141
141
let new_generation = archetypes. generation ( ) ;
142
142
let old_generation = std:: mem:: replace ( & mut self . archetype_generation , new_generation) ;
0 commit comments