mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Refactor package_qualified_imported_modules in load
This commit is contained in:
parent
eea2196c30
commit
9df5fb7092
2 changed files with 13 additions and 13 deletions
|
@ -5353,19 +5353,10 @@ fn parse<'a>(
|
|||
// We always need to send these, even if deps is empty,
|
||||
// because the coordinator thread needs to receive this message
|
||||
// to decrement its "pending" count.
|
||||
let mut package_qualified_imported_modules = MutSet::default();
|
||||
for (pq_module_name, module_id) in &deps_by_name {
|
||||
match pq_module_name {
|
||||
PackageQualified::Unqualified(_) => {
|
||||
package_qualified_imported_modules
|
||||
.insert(PackageQualified::Unqualified(*module_id));
|
||||
}
|
||||
PackageQualified::Qualified(shorthand, _) => {
|
||||
package_qualified_imported_modules
|
||||
.insert(PackageQualified::Qualified(shorthand, *module_id));
|
||||
}
|
||||
}
|
||||
}
|
||||
let package_qualified_imported_modules = deps_by_name
|
||||
.iter()
|
||||
.map(|(pq_module_name, module_id)| pq_module_name.map_module(|_| *module_id))
|
||||
.collect();
|
||||
|
||||
// SAFETY: By this point we've already incrementally verified that there
|
||||
// are no UTF-8 errors in these bytes. If there had been any UTF-8 errors,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue