fix unreachable macro calls for rust 2021 (#3889)

# 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: https://github.com/rust-lang/rust/issues/92137#issuecomment-1019519285
- this is making Bevy CI fail now: https://github.com/bevyengine/bevy/runs/5102586734?check_suite_focus=true

## Solution

- Fix calls to `unreachable`
This commit is contained in:
François 2022-02-08 02:59:54 +00:00
parent b3462428c9
commit 1468211e2b

View file

@ -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() {
@ -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) };
@ -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")]
@ -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;