Skip to content

Commit

Permalink
document safety of system.run_unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann committed Jun 20, 2022
1 parent 3e2cfc8 commit 3d67d6e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/bevy_ecs/src/schedule/executor_parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,8 @@ impl ParallelExecutor {
.unwrap_or_else(|error| unreachable!("{}", error));
#[cfg(feature = "trace")]
let system_guard = system_span.enter();
#[allow(clippy::undocumented_unsafe_blocks)] // TODO: document why this is safe
unsafe {
system.run_unsafe((), world)
};
// SAFETY: the executor prevents two systems with conflicting access from running simultaneously.
unsafe { system.run_unsafe((), world) };
#[cfg(feature = "trace")]
drop(system_guard);
finish_sender
Expand Down

0 comments on commit 3d67d6e

Please sign in to comment.