TableInstance is specialized for any func

This commit is contained in:
Sergey Pepyakin
2017-12-09 15:32:19 +01:00
parent 0a92032956
commit 987fffb6c3
4 changed files with 149 additions and 148 deletions

View File

@ -47,7 +47,7 @@ impl<'a, B: 'a> CheckedRegion<'a, B> where B: ::std::ops::Deref<Target=Vec<u8>>
impl MemoryInstance {
/// Create new linear memory instance.
pub fn new(memory_type: &MemoryType) -> Result<Arc<Self>, Error> {
pub fn new(memory_type: &MemoryType) -> Result<Self, Error> {
check_limits(memory_type.limits())?;
let maximum_size = match memory_type.limits().maximum() {
@ -65,7 +65,7 @@ impl MemoryInstance {
maximum_size: maximum_size,
};
Ok(Arc::new(memory))
Ok(memory)
}
/// Return linear memory limits.