mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-03 10:01:39 +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,
|
||||
}
|
||||
|
||||
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<ValidatedModule, Error> {
|
||||
let mut context_builder = ModuleContextBuilder::new();
|
||||
let mut imported_globals = Vec::new();
|
||||
|
Loading…
x
Reference in New Issue
Block a user