mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
auto clippy fixes
This commit is contained in:
parent
72c85efc83
commit
ef39bad7c6
146 changed files with 750 additions and 1005 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue