Make types more consistent

This commit is contained in:
Syrus
2020-05-05 15:46:07 -07:00
parent 9e5103f3af
commit 456d7e31d2
4 changed files with 12 additions and 19 deletions

View File

@@ -19,13 +19,10 @@ pub trait CompiledModule: DowncastSync {
) -> Result<(), InstantiationError>;
/// Return a reference-counting pointer to a module.
fn module(&self) -> &Arc<Module>;
fn module(&self) -> &Module;
/// Return a reference-counting pointer to a module.
fn module_mut(&mut self) -> &mut Arc<Module>;
/// Return a reference to a module.
fn module_ref(&self) -> &Module;
fn module_mut(&mut self) -> &mut Module;
}
impl_downcast!(sync CompiledModule); // `sync` => also produce `Arc` downcasts.