From 7fc4f09c87ccf357a90b3b0b9e9816ea20a1aae1 Mon Sep 17 00:00:00 2001
From: Nolan Darilek <nolan@thewordnerd.info>
Date: Tue, 3 May 2022 09:22:32 -0500
Subject: [PATCH] Update to Bevy 0.7.

---
 Cargo.toml       |  3 +--
 examples/game.rs | 15 +++++++++------
 src/lib.rs       |  5 ++---
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 4873bef..b77f1b8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,9 +10,8 @@ edition = "2021"
 [dependencies]
 alto = "3"
 anyhow = "1"
-bevy = { version = "0.6", default-features = false }
+bevy = { version = "0.7", default-features = false }
 claxon = "0.4"
-derive_more = "0.99"
 hound = "3"
 lewton = "0.10"
 minimp3 = "0.5"
\ No newline at end of file
diff --git a/examples/game.rs b/examples/game.rs
index 32471b5..9e9dc22 100644
--- a/examples/game.rs
+++ b/examples/game.rs
@@ -35,7 +35,10 @@ fn load_and_create(
         .get_group_load_state(handles.sounds.iter().map(|handle| handle.id))
         == LoadState::Loaded;
     if handles.loaded {
-        commands.spawn().insert(Listener).insert(Transform::default);
+        commands
+            .spawn()
+            .insert(Listener)
+            .insert(Transform::default());
         let handle = handles.sounds[0].clone();
         let buffer = asset_server.get_handle(handle);
         commands
@@ -46,18 +49,18 @@ fn load_and_create(
                 state: SoundState::Playing,
                 gain: 0.4,
                 looping: true,
-                ..Default::default()
+                ..default()
             });
     }
 }
 
 fn main() {
-    App::build()
+    App::new()
         .add_plugins(DefaultPlugins)
-        .add_system(bevy::input::system::exit_on_esc_system.system())
+        .add_system(bevy::input::system::exit_on_esc_system)
         .add_plugin(OpenAlPlugin)
         .init_resource::<AssetHandles>()
-        .add_startup_system(setup.system())
-        .add_system(load_and_create.system())
+        .add_startup_system(setup)
+        .add_system(load_and_create)
         .run();
 }
diff --git a/src/lib.rs b/src/lib.rs
index 3c02f0d..c67e8c2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -13,7 +13,6 @@ use bevy::{
     transform::TransformSystem,
     utils::BoxedFuture,
 };
-use derive_more::{Deref, DerefMut};
 use lewton::inside_ogg::OggStreamReader;
 use minimp3::{Decoder, Error};
 
@@ -206,8 +205,8 @@ pub struct Sound {
 impl Default for Sound {
     fn default() -> Self {
         Self {
-            buffer: Default::default(),
-            state: Default::default(),
+            buffer: default(),
+            state: default(),
             gain: 1.,
             looping: false,
             pitch: 1.,