Method
get_idx
(&self, module_id: Option<wast::token::Id<'_>>)
Source from the content-addressed store, hash-verified
| 41 | } |
| 42 | |
| 43 | fn get_idx(&self, module_id: Option<wast::token::Id<'_>>) -> Option<u32> { |
| 44 | match module_id { |
| 45 | Some(module) => self |
| 46 | .modules |
| 47 | .get(module.name()) |
| 48 | .or_else(|| self.named_modules.get(module.name())) |
| 49 | .map(ModuleInstance::id), |
| 50 | None => self.last_module.as_ref().map(ModuleInstance::id), |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | fn get(&self, module_id: Option<wast::token::Id<'_>>) -> Option<ModuleInstance> { |
| 55 | match module_id { |
Tested by
no test coverage detected