From 08815a3c298faa1c1ec5a35435494c906e5fc75e Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 15 Dec 2022 16:37:34 -0600 Subject: [PATCH] Make plugin struct `Copy`. --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e826d67..ddf9630 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -669,7 +669,7 @@ pub enum SynthizerSystems { #[derive(Resource)] struct InitializationGuard(syz::InitializationGuard); -#[derive(Resource, Clone, Default, Debug)] +#[derive(Resource, Clone, Copy, Default, Debug)] pub struct SynthizerPlugin { pub default_panner_strategy: Option, pub default_distance_model: Option, @@ -685,9 +685,9 @@ pub struct SynthizerPlugin { impl Plugin for SynthizerPlugin { fn build(&self, app: &mut App) { if !app.world.contains_resource::() { - app.insert_resource(self.clone()); + app.insert_resource(*self); } - let config = app.world.get_resource::().unwrap().clone(); + let config = *app.world.get_resource::().unwrap(); let mut syz_config = syz::LibraryConfig::new(); syz_config.log_level(config.log_level); if config.log_to_stderr {