inline pattern match

This commit is contained in:
Folkert 2023-07-10 21:17:58 +02:00
parent 8c666edbec
commit da9482b7fa
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -86,17 +86,12 @@ fn specialize_drops_stmt<'a, 'i>(
}}; }};
} }
let Call { match call.call_type.clone().replace_lowlevel_wrapper() {
call_type,
arguments,
} = call;
match call_type.clone().replace_lowlevel_wrapper() {
CallType::LowLevel { CallType::LowLevel {
op: LowLevel::ListGetUnsafe, op: LowLevel::ListGetUnsafe,
.. ..
} => { } => {
let [structure, index] = match arguments { let [structure, index] = match call.arguments {
[structure, index] => [structure, index], [structure, index] => [structure, index],
_ => unreachable!("List get should have two arguments"), _ => unreachable!("List get should have two arguments"),
}; };