Improved memory type

This commit is contained in:
Syrus Akbary
2021-07-12 21:01:49 -07:00
parent 2c75468c9e
commit ee006c3ad4
2 changed files with 13 additions and 5 deletions

View File

@@ -97,7 +97,9 @@ impl Memory {
/// assert_eq!(m.ty(), mt);
/// ```
pub fn ty(&self) -> MemoryType {
self.vm_memory.ty.clone()
let mut ty = self.vm_memory.ty.clone();
ty.minimum = self.size();
ty
}
/// Returns the [`Store`] where the `Memory` belongs.