Rust 1.95 promoted collapsible_match and map_unwrap_or; CI runs -D warnings so they break the build. Collapse nested `if`s into match guards across codegen/optimizer/export, and swap map().unwrap_or(..) for map_or / is_ok_and.
This commit is contained in:
@@ -131,10 +131,8 @@ pub fn export_module(
|
||||
fn collect_external_calls(ops: &[IrOp], ir_ids: &HashSet<WordId>, host_ids: &mut HashSet<WordId>) {
|
||||
for op in ops {
|
||||
match op {
|
||||
IrOp::Call(id) | IrOp::TailCall(id) => {
|
||||
if !ir_ids.contains(id) {
|
||||
host_ids.insert(*id);
|
||||
}
|
||||
IrOp::Call(id) | IrOp::TailCall(id) if !ir_ids.contains(id) => {
|
||||
host_ids.insert(*id);
|
||||
}
|
||||
IrOp::If {
|
||||
then_body,
|
||||
|
||||
Reference in New Issue
Block a user