Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Fix for bevy CI on main - clippy safety comments on trait. #5665

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/system/system_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ impl<'w, 's> SystemParamFetch<'w, 's> for WorldState {
/// ```
pub struct Local<'a, T: FromWorld + Send + Sync + 'static>(&'a mut T);

// SAFE: Local only accesses internal state
// SAFETY: Local only accesses internal state
unsafe impl<T: Send + Sync + 'static> ReadOnlySystemParamFetch for LocalState<T> {}

impl<'a, T: FromWorld + Send + Sync + 'static> Debug for Local<'a, T>
Expand Down Expand Up @@ -711,7 +711,7 @@ impl<'a, T: Send + Sync + 'static + FromWorld> SystemParam for Local<'a, T> {
type Fetch = LocalState<T>;
}

// SAFE: only local state is accessed
// SAFETY: only local state is accessed
unsafe impl<T: FromWorld + Send + Sync + 'static> SystemParamState for LocalState<T> {
fn init(world: &mut World, _system_meta: &mut SystemMeta) -> Self {
Self(T::from_world(world))
Expand Down