From a64dfa25b42e1e70531203e20d633e6aa9c7ebed Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Tue, 9 Jan 2018 13:23:50 +0300 Subject: [PATCH] Deref for ValidatedModule --- src/validation/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/validation/mod.rs b/src/validation/mod.rs index 78cf6b2..0204e8f 100644 --- a/src/validation/mod.rs +++ b/src/validation/mod.rs @@ -35,7 +35,7 @@ pub struct ValidatedModule { module: Module, } -impl<'a> ValidatedModule { +impl ValidatedModule { pub fn module(&self) -> &Module { &self.module } @@ -49,6 +49,13 @@ impl<'a> ValidatedModule { } } +impl ::std::ops::Deref for ValidatedModule { + type Target = Module; + fn deref(&self) -> &Module { + &self.module + } +} + pub fn validate_module(module: Module) -> Result { let mut context_builder = ModuleContextBuilder::new(); let mut imported_globals = Vec::new();