Skip to content

Commit 376f55c

Browse files
committed
todo for extract pram
1 parent c9519d4 commit 376f55c

File tree

2 files changed

+5
-24
lines changed

2 files changed

+5
-24
lines changed

crates/bevy_ecs/src/system/function_system.rs

-13
Original file line numberDiff line numberDiff line change
@@ -340,19 +340,6 @@ impl<Param: SystemParam> SystemState<Param> {
340340
Param::apply(&mut self.param_state, &self.meta, world);
341341
}
342342

343-
/// Validates that the data can be acquired
344-
/// For systems this means they won't be executed.
345-
///
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)
354-
}
355-
356343
/// Returns `true` if `world_id` matches the [`World`] that was used to call [`SystemState::new`].
357344
/// Otherwise, this returns false.
358345
#[inline]

crates/bevy_render/src/extract_param.rs

+5-11
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,12 @@ where
7676

7777
#[inline]
7878
unsafe fn validate_param(
79-
state: &Self::State,
80-
system_meta: &SystemMeta,
81-
world: UnsafeWorldCell,
79+
_state: &Self::State,
80+
_system_meta: &SystemMeta,
81+
_world: UnsafeWorldCell,
8282
) -> bool {
83-
let mut valid = true;
84-
// SAFETY: Delegated to existing `SystemParam` implementations.
85-
valid &= unsafe { SystemState::<P>::validate_param(&state.state, world) };
86-
// SAFETY: Delegated to existing `SystemParam` implementations.
87-
valid &= unsafe {
88-
Res::<MainWorld>::validate_param(&state.main_world_state, system_meta, world)
89-
};
90-
valid
83+
// TODO: make `validate_param` work with multiple worlds
84+
true
9185
}
9286

9387
#[inline]

0 commit comments

Comments
 (0)