Skip to content

Commit c12cb04

Browse files
committed
fix docs
1 parent 8e2c754 commit c12cb04

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

crates/bevy_ecs/src/system/exclusive_function_system.rs

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ where
151151

152152
#[inline]
153153
unsafe fn validate_param_unsafe(&mut self, _world: UnsafeWorldCell) -> bool {
154+
// All exclusive system params are always available.
154155
true
155156
}
156157

crates/bevy_ecs/src/system/function_system.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ impl WarnPolicy {
154154
#[inline]
155155
fn advance(&mut self) {
156156
*self = match self {
157-
Self::Never => Self::Never,
158-
Self::Once => Self::Never,
157+
Self::Never | Self::Once => Self::Never,
159158
Self::Always => Self::Always,
160159
};
161160
}
@@ -172,7 +171,7 @@ impl WarnPolicy {
172171
bevy_utils::tracing::warn!(
173172
"System {0} will not run because it requested inaccessible system parameter {1}",
174173
name,
175-
std::any::type_name::<P>()
174+
core::any::type_name::<P>()
176175
);
177176
}
178177
}
@@ -723,6 +722,7 @@ where
723722
#[inline]
724723
unsafe fn validate_param_unsafe(&mut self, world: UnsafeWorldCell) -> bool {
725724
let param_state = self.param_state.as_ref().expect(Self::PARAM_MESSAGE);
725+
// SAFETY: Delegate to `SystemParam` implementation.
726726
let is_valid = unsafe { F::Param::validate_param(param_state, &self.system_meta, world) };
727727
if !is_valid {
728728
self.system_meta.advance_warn_policy();

0 commit comments

Comments
 (0)