diff --git a/src/schema/script.rs b/src/schema/script.rs index 603c2c2b..3d38e464 100644 --- a/src/schema/script.rs +++ b/src/schema/script.rs @@ -25,7 +25,7 @@ //! Components related to the scripting system used by schema or applied at the //! specific contract operation level -use std::ops::Deref; +use std::ops::{Deref, DerefMut}; use strict_types::TypeSystem; @@ -101,6 +101,14 @@ impl Deref for Types { } } +impl DerefMut for Types { + fn deref_mut(&mut self) -> &mut Self::Target { + match self { + Types::Strict(sys) => sys, + } + } +} + impl Default for Types { fn default() -> Self { Types::Strict(none!()) } }