Make plugin struct Copy.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nolan Darilek 2022-12-15 16:37:34 -06:00
parent 47429c2df2
commit 08815a3c29

View File

@ -669,7 +669,7 @@ pub enum SynthizerSystems {
#[derive(Resource)] #[derive(Resource)]
struct InitializationGuard(syz::InitializationGuard); struct InitializationGuard(syz::InitializationGuard);
#[derive(Resource, Clone, Default, Debug)] #[derive(Resource, Clone, Copy, Default, Debug)]
pub struct SynthizerPlugin { pub struct SynthizerPlugin {
pub default_panner_strategy: Option<syz::PannerStrategy>, pub default_panner_strategy: Option<syz::PannerStrategy>,
pub default_distance_model: Option<syz::DistanceModel>, pub default_distance_model: Option<syz::DistanceModel>,
@ -685,9 +685,9 @@ pub struct SynthizerPlugin {
impl Plugin for SynthizerPlugin { impl Plugin for SynthizerPlugin {
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
if !app.world.contains_resource::<SynthizerPlugin>() { if !app.world.contains_resource::<SynthizerPlugin>() {
app.insert_resource(self.clone()); app.insert_resource(*self);
} }
let config = app.world.get_resource::<SynthizerPlugin>().unwrap().clone(); let config = *app.world.get_resource::<SynthizerPlugin>().unwrap();
let mut syz_config = syz::LibraryConfig::new(); let mut syz_config = syz::LibraryConfig::new();
syz_config.log_level(config.log_level); syz_config.log_level(config.log_level);
if config.log_to_stderr { if config.log_to_stderr {