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 {