replaced most iter::once

This commit is contained in:
J.Teeuwissen 2023-04-16 19:58:28 +02:00
parent 10de47db50
commit ca45e3c9f9
No known key found for this signature in database
GPG key ID: DB5F7A1ED8D478AD
2 changed files with 13 additions and 13 deletions

View file

@ -330,7 +330,7 @@ fn insert_reset_reuse_operations_stmt<'a, 'i>(
new_branches
.into_iter()
.map(|(_, _, _, branch_env)| branch_env)
.chain(std::iter::once(new_default_branch.2)),
.chain([new_default_branch.2]),
);
arena.alloc(Stmt::Switch {
@ -1038,7 +1038,7 @@ impl<'a> ReuseEnvironment<'a> {
None => {
// If the layout is not in the map, create a new stack with the token.
self.reuse_tokens
.insert(*layout, Vec::from_iter_in(std::iter::once(token), arena));
.insert(*layout, Vec::from_iter_in([token], arena));
}
};
}