From 7ca855b3fcfa9e5e5bb3dab60f3ab3a8b47a7c3e Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 7 Apr 2022 16:49:39 +0200 Subject: [PATCH] Make State cloneable This is needed for user preset support. --- src/wrapper/state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wrapper/state.rs b/src/wrapper/state.rs index fc142e6b..4525b72f 100644 --- a/src/wrapper/state.rs +++ b/src/wrapper/state.rs @@ -13,7 +13,7 @@ use crate::plugin::BufferConfig; // management /// A plain, unnormalized value for a parameter. -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ParamValue { F32(f32), @@ -23,7 +23,7 @@ pub enum ParamValue { /// A plugin's state so it can be restored at a later point. This object can be serialized and /// deserialized using serde. -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct State { /// The plugin's parameter values. These are stored unnormalized. This mean sthe old values will /// be recalled when when the parameter's range gets increased. Doing so may still mess with