File tree 2 files changed +9
-4
lines changed 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -343,9 +343,14 @@ impl<Param: SystemParam> SystemState<Param> {
343
343
/// Validates that the data can be acquired
344
344
/// For systems this means they won't be executed.
345
345
///
346
- // SAFETY: Delegated to existing `SystemParam` implementations.
347
- pub unsafe fn validate_param ( & mut self , world : & mut World ) {
348
- Param :: apply ( & mut self . param_state , & self . meta , world) ;
346
+ /// # Safety
347
+ ///
348
+ /// - The passed [`UnsafeWorldCell`] must have read access to any world data
349
+ /// registered in [`new`](SystemState::new).
350
+ /// - `world` must be the same [`World`] that was used to initialize [`state`](SystemState::new).
351
+ pub unsafe fn validate_param ( & self , world : UnsafeWorldCell ) -> bool {
352
+ // SAFETY: Delegated to existing `SystemParam` implementations.
353
+ Param :: validate_param ( & self . param_state , & self . meta , world)
349
354
}
350
355
351
356
/// Returns `true` if `world_id` matches the [`World`] that was used to call [`SystemState::new`].
Original file line number Diff line number Diff line change 82
82
) -> bool {
83
83
let mut valid = true ;
84
84
// SAFETY: Delegated to existing `SystemParam` implementations.
85
- valid &= unsafe { SystemState :: < P > :: validate_param ( & state. state , system_meta , world) } ;
85
+ valid &= unsafe { SystemState :: < P > :: validate_param ( & state. state , world) } ;
86
86
// SAFETY: Delegated to existing `SystemParam` implementations.
87
87
valid &= unsafe {
88
88
Res :: < MainWorld > :: validate_param ( & state. main_world_state , system_meta, world)
You can’t perform that action at this time.
0 commit comments