15540 Make World::flush_commands private (#15553)
# Objective Fixes #15540 End-users risk using `World::flush_commands` instead of `World::flush`, which panics if any queued commands are `spawn`. Hiding `World::flush_commands` would help avoid calling a potentially panicky function, and helps alleviate end-user API confusion. ## Solution This PR updates the function visibility to crate-level, like `World::flush_entities`, hiding it from the end-user while still making it accessible for the tests that are currently set up. ## Testing The change was tested by executing the available tests for `bevy_ecs`. From what I've gathered, `World::flush_commands` is not used in any other bevy crate. If further testing is recommended, please inform me! --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
A
Andreas committed
383c2e5bd71dca9396d0ceb1e7fafc734b857799
Parent: 73af2b7
Committed by GitHub <noreply@github.com>
on 9/30/2024, 10:07:09 PM