clippy fix

This commit is contained in:
NotAFile 2022-04-05 23:35:30 +02:00
parent a2cca95dbd
commit 83540e898a
2 changed files with 4 additions and 4 deletions

View File

@ -140,8 +140,8 @@ fn lower_comb(
.expect("signal has no size"), .expect("signal has no size"),
Some(rtlil::PortOption::Output(block.signals.len() as i32)), Some(rtlil::PortOption::Output(block.signals.len() as i32)),
)); ));
for (_, expr) in &block.exprs { for expr in block.exprs.values() {
let expr_wire = lower_expression(ctx, module, block, &expr)?; let expr_wire = lower_expression(ctx, module, block, expr)?;
module.add_connection(&wire_for_expr(expr.id), &expr_wire); module.add_connection(&wire_for_expr(expr.id), &expr_wire);
} }
let out_sig = wire_for_expr(block.expr); let out_sig = wire_for_expr(block.expr);

View File

@ -41,8 +41,8 @@ impl Context {
self.types.pretty_type(&mut typ_pretty, sig.typ)?; self.types.pretty_type(&mut typ_pretty, sig.typ)?;
writeln!(w, "sig_{}: {}", sig.id.0, typ_pretty)? writeln!(w, "sig_{}: {}", sig.id.0, typ_pretty)?
} }
for (_, expr) in &body.exprs { for expr in body.exprs.values() {
self.pretty_typed_expr(w, &expr)?; self.pretty_typed_expr(w, expr)?;
} }
writeln!(w, "return _{}", body.expr.0)?; writeln!(w, "return _{}", body.expr.0)?;
Ok(()) Ok(())