Skip to content

Commit

Permalink
fix unreachable macro calls for rust 2021 (#3889)
Browse files Browse the repository at this point in the history
# Objective

- It was decided in Rust 2021 to make macro like `panic` require a string literal to format instead of directly an object
- `unreachable` was missed during the first pass but it was decided to go for it anyway now: rust-lang/rust#92137 (comment)
- this is making Bevy CI fail now: https://github.com/bevyengine/bevy/runs/5102586734?check_suite_focus=true

## Solution

- Fix calls to `unreachable`
  • Loading branch information
mockersf committed Feb 8, 2022
1 parent b346242 commit 1468211
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/bevy_ecs/src/schedule/executor_parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl ParallelSystemExecutor for ParallelExecutor {
.finish_receiver
.recv()
.await
.unwrap_or_else(|error| unreachable!(error));
.unwrap_or_else(|error| unreachable!("{}", error));
self.process_finished_system(index);
// Gather other systems than may have finished.
while let Ok(index) = self.finish_receiver.try_recv() {
Expand Down Expand Up @@ -208,7 +208,7 @@ impl ParallelExecutor {
start_receiver
.recv()
.await
.unwrap_or_else(|error| unreachable!(error));
.unwrap_or_else(|error| unreachable!("{}", error));
#[cfg(feature = "trace")]
let system_guard = system_span.enter();
unsafe { system.run_unsafe((), world) };
Expand All @@ -217,7 +217,7 @@ impl ParallelExecutor {
finish_sender
.send(index)
.await
.unwrap_or_else(|error| unreachable!(error));
.unwrap_or_else(|error| unreachable!("{}", error));
};

#[cfg(feature = "trace")]
Expand Down Expand Up @@ -268,7 +268,7 @@ impl ParallelExecutor {
.start_sender
.send(())
.await
.unwrap_or_else(|error| unreachable!(error));
.unwrap_or_else(|error| unreachable!("{}", error));
self.running.set(index, true);
if !system_metadata.is_send {
self.non_send_running = true;
Expand Down

0 comments on commit 1468211

Please sign in to comment.