mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Use iterator chaining over hash insertion
This commit is contained in:
parent
5f33073703
commit
095844c2c1
1 changed files with 2 additions and 4 deletions
|
@ -367,11 +367,9 @@ fn gen(
|
|||
jump_counter: arena.alloc(0),
|
||||
};
|
||||
|
||||
// TODO remove this
|
||||
decls_by_id.insert(loaded.module_id, home_decls);
|
||||
|
||||
// Populate Procs from decls
|
||||
for (_, mut decls) in decls_by_id.drain() {
|
||||
// Add modules' decls to Procs
|
||||
for (_, mut decls) in decls_by_id.drain().chain(std::iter::once((loaded.module_id, home_decls))) {
|
||||
for decl in decls.drain(..) {
|
||||
use roc_can::def::Declaration::*;
|
||||
use roc_can::expr::Expr::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue