auto clippy fixes

This commit is contained in:
Folkert 2023-06-26 20:42:50 +02:00
parent 72c85efc83
commit ef39bad7c6
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
146 changed files with 750 additions and 1005 deletions

View file

@ -806,7 +806,7 @@ fn specialize_struct<'a, 'i>(
// This value has not been index before, create a new symbol.
None => {
let field_symbol =
environment.create_symbol(ident_ids, &format!("field_val_{}", i));
environment.create_symbol(ident_ids, &format!("field_val_{i}"));
let field_val_expr = Expr::StructAtIndex {
index: i as u64,
@ -945,7 +945,7 @@ fn specialize_union<'a, 'i>(
Some(rc) => {
let field_symbol = environment.create_symbol(
ident_ids,
&format!("field_val_{}", i),
&format!("field_val_{i}"),
);
let field_val_expr = Expr::UnionAtIndex {
@ -1134,11 +1134,11 @@ fn specialize_list<'a, 'i>(
// If the symbol is unknown, we have to get the value from the list.
// Should only happen when list elements are discarded.
None => {
let field_symbol = environment
.create_symbol(ident_ids, &format!("field_val_{}", i));
let field_symbol =
environment.create_symbol(ident_ids, &format!("field_val_{i}"));
let index_symbol = environment
.create_symbol(ident_ids, &format!("index_val_{}", i));
let index_symbol =
environment.create_symbol(ident_ids, &format!("index_val_{i}"));
let dec = arena.alloc(Stmt::Refcounting(
ModifyRc::Dec(field_symbol),