Method
get
(&self, module_id: Option<wast::token::Id<'_>>)
Source from the content-addressed store, hash-verified
| 52 | } |
| 53 | |
| 54 | fn get(&self, module_id: Option<wast::token::Id<'_>>) -> Option<ModuleInstance> { |
| 55 | match module_id { |
| 56 | Some(module_id) => { |
| 57 | self.modules.get(module_id.name()).or_else(|| self.named_modules.get(module_id.name())).cloned() |
| 58 | } |
| 59 | None => self.last_module.clone(), |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | fn last(&self) -> Option<ModuleInstance> { |
| 64 | self.last_module.clone() |
Tested by
no test coverage detected