From e74f7a7335e66199a55b443c872dee23cbf03dc7 Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Sun, 12 Sep 2021 23:40:22 +0000 Subject: [PATCH] Fix the new nightly CI errors (#2811) # Objective - CI is failing again - These failures result from https://github.com/rust-lang/rust/pull/85200 ## Solution - Fix the errors which result from this by using the given fields - I also removed the now unused `Debug` impl. I suspect that we shouldn't use -D warnings for nightly CI - ideally we'd get a discord webhook message into some (non-#github) dedicated channel on warnings. But this does not implement that. --- crates/bevy_ecs/examples/events.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/bevy_ecs/examples/events.rs b/crates/bevy_ecs/examples/events.rs index a90510526f002..af76d3e50c3c0 100644 --- a/crates/bevy_ecs/examples/events.rs +++ b/crates/bevy_ecs/examples/events.rs @@ -41,7 +41,6 @@ enum EventSystem { } // This is our event that we will send and receive in systems -#[derive(Debug)] struct MyEvent { pub message: String, pub random_value: f32, @@ -62,6 +61,9 @@ fn sending_system(mut event_writer: EventWriter) { // If an event is received it will be printed to the console fn receiving_system(mut event_reader: EventReader) { for my_event in event_reader.iter() { - println!(" Received: {:?}", *my_event); + println!( + " Received message {:?}, with random value of {}", + my_event.message, my_event.random_value + ); } }