mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Rename the params module to param
It's a heterogeneous module, and splitting the ranges to their own module will be a bit weird otherwise.
This commit is contained in:
@@ -104,9 +104,9 @@ pub fn derive_params(input: TokenStream) -> TokenStream {
|
||||
// function we get type erasure for free since we only need to worry about byte
|
||||
// vectors
|
||||
field_serialize_tokens.push(quote! {
|
||||
match ::nih_plug::params::PersistentField::map(
|
||||
match ::nih_plug::param::PersistentField::map(
|
||||
&self.#field_name,
|
||||
::nih_plug::params::serialize_field,
|
||||
::nih_plug::param::serialize_field,
|
||||
) {
|
||||
Ok(data) => {
|
||||
serialized.insert(String::from(#stable_name), data);
|
||||
@@ -118,9 +118,9 @@ pub fn derive_params(input: TokenStream) -> TokenStream {
|
||||
});
|
||||
field_deserialize_tokens.push(quote! {
|
||||
#stable_name => {
|
||||
match ::nih_plug::params::deserialize_field(&data) {
|
||||
match ::nih_plug::param::deserialize_field(&data) {
|
||||
Ok(deserialized) => {
|
||||
::nih_plug::params::PersistentField::set(
|
||||
::nih_plug::param::PersistentField::set(
|
||||
&self.#field_name,
|
||||
deserialized,
|
||||
);
|
||||
@@ -152,7 +152,7 @@ pub fn derive_params(input: TokenStream) -> TokenStream {
|
||||
impl Params for #struct_name {
|
||||
fn param_map(
|
||||
self: std::pin::Pin<&Self>,
|
||||
) -> std::collections::HashMap<&'static str, nih_plug::params::ParamPtr> {
|
||||
) -> std::collections::HashMap<&'static str, nih_plug::param::ParamPtr> {
|
||||
let mut param_map = std::collections::HashMap::new();
|
||||
|
||||
#(#param_mapping_insert_tokens)*
|
||||
|
||||
Reference in New Issue
Block a user