deref for not-started module

This commit is contained in:
NikVolf 2018-01-28 12:43:54 +03:00
parent 551c992730
commit fdf65737ce
1 changed files with 8 additions and 0 deletions

View File

@ -603,6 +603,14 @@ pub struct NotStartedModuleRef<'a> {
instance: ModuleRef, instance: ModuleRef,
} }
impl<'a> ::std::ops::Deref for NotStartedModuleRef<'a> {
type Target = ModuleInstance;
fn deref(&self) -> &ModuleInstance {
&*self.instance
}
}
impl<'a> NotStartedModuleRef<'a> { impl<'a> NotStartedModuleRef<'a> {
pub fn not_started_instance(&self) -> &ModuleRef { pub fn not_started_instance(&self) -> &ModuleRef {
&self.instance &self.instance