Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
JonahPlusPlus committed Apr 2, 2023
1 parent 9dcf45f commit fab7927
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions crates/bevy_ecs/src/schedule/executor/single_threaded.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
use std::{
any::Any,
panic::AssertUnwindSafe,
sync::Mutex,
};
use std::{any::Any, panic::AssertUnwindSafe, sync::Mutex};

#[cfg(feature = "trace")]
use bevy_utils::tracing::info_span;
Expand Down Expand Up @@ -121,7 +117,8 @@ impl SystemExecutor for SingleThreadedExecutor {
system_span.exit();
if let Err(payload) = res {
eprintln!("Encountered a panic in system `{}`!", &*system.name());
self.disabled_writes.extend(system.component_access().writes().map(|id| id.index()));
self.disabled_writes
.extend(system.component_access().writes().map(|id| id.index()));
let mut panic_payload = self.panic_payload.lock().unwrap();
*panic_payload = Some(payload);
}
Expand All @@ -132,7 +129,7 @@ impl SystemExecutor for SingleThreadedExecutor {
if self.apply_final_buffers {
self.apply_system_buffers(schedule, world);
}

// check to see if there was a panic
let mut payload = self.panic_payload.lock().unwrap();
if let Some(payload) = payload.take() {
Expand Down

0 comments on commit fab7927

Please sign in to comment.