Helper that defines a function body in the code section and takes ownership of it so that it is dropped and its memory reclaimed after adding it to the module.
(code: &mut wasm_encoder::CodeSection, mut func: wasm_encoder::Function)
| 404 | // ownership of it so that it is dropped and its memory reclaimed after |
| 405 | // adding it to the module. |
| 406 | fn function(code: &mut wasm_encoder::CodeSection, mut func: wasm_encoder::Function) { |
| 407 | func.instruction(&Instruction::End); |
| 408 | code.function(&func); |
| 409 | } |
| 410 | } |
| 411 | } |
| 412 |
no test coverage detected