mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Use unwrap_call
instead of an explicit match
This commit is contained in:
parent
c7021ba307
commit
71209686e9
@ -148,13 +148,9 @@ impl WasmBindgenDescriptorsSection {
|
||||
walrus::FunctionKind::Local(l) => l,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
match local.get_mut(call_instr) {
|
||||
Expr::Call(e) => {
|
||||
assert_eq!(e.func, wbindgen_describe_closure);
|
||||
e.func = id;
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
let call = local.get_mut(call_instr).unwrap_call_mut();
|
||||
assert_eq!(call.func, wbindgen_describe_closure);
|
||||
call.func = id;
|
||||
self.closure_imports
|
||||
.insert(import_id, descriptor.unwrap_closure());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user