mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-08 12:31:35 +00:00
Deref<Target=Module> for ValidatedModule
This commit is contained in:
parent
48c2434402
commit
a64dfa25b4
@ -35,7 +35,7 @@ pub struct ValidatedModule {
|
|||||||
module: Module,
|
module: Module,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> ValidatedModule {
|
impl ValidatedModule {
|
||||||
pub fn module(&self) -> &Module {
|
pub fn module(&self) -> &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<ValidatedModule, Error> {
|
pub fn validate_module(module: Module) -> Result<ValidatedModule, Error> {
|
||||||
let mut context_builder = ModuleContextBuilder::new();
|
let mut context_builder = ModuleContextBuilder::new();
|
||||||
let mut imported_globals = Vec::new();
|
let mut imported_globals = Vec::new();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user