From 640fe0ebd7fb8166e44d82c4bbc35fb5f49f8a46 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 5 Feb 2022 17:43:15 +0100 Subject: [PATCH] Make parameter pointers hashable So we can use have generic APIs that take a `Param` implementation and know how to map those to the parameter IDs used by the plugin API. --- src/param/internals.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/param/internals.rs b/src/param/internals.rs index d682912c..d8d68e6e 100644 --- a/src/param/internals.rs +++ b/src/param/internals.rs @@ -65,7 +65,7 @@ pub trait Params { } /// Internal pointers to parameters. This is an implementation detail used by the wrappers. -#[derive(Debug, PartialEq, Eq, Clone, Copy)] +#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)] pub enum ParamPtr { FloatParam(*mut super::FloatParam), IntParam(*mut super::IntParam),