mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Make a lock get dropped sooner
This commit is contained in:
parent
2cc6a16dd1
commit
291e6cce73
1 changed files with 10 additions and 8 deletions
|
@ -2192,19 +2192,21 @@ fn update<'a>(
|
|||
|
||||
let mut work = MutSet::default();
|
||||
|
||||
// Register the package's path under its shorthand
|
||||
// (e.g. for { pf: "blah" }, register that "pf" should resolve to "blah")
|
||||
{
|
||||
let mut shorthands = (*state.arc_shorthands).lock();
|
||||
|
||||
for (shorthand, package_name) in header.packages.iter() {
|
||||
shorthands.insert(shorthand, *package_name);
|
||||
for (shorthand, package_path) in header.packages.iter() {
|
||||
shorthands.insert(shorthand, *package_path);
|
||||
}
|
||||
}
|
||||
|
||||
if let Platform {
|
||||
config_shorthand, ..
|
||||
} = header.header_for
|
||||
{
|
||||
work.extend(state.dependencies.notify_package(config_shorthand));
|
||||
}
|
||||
if let Platform {
|
||||
config_shorthand, ..
|
||||
} = header.header_for
|
||||
{
|
||||
work.extend(state.dependencies.notify_package(config_shorthand));
|
||||
}
|
||||
|
||||
match header.header_for {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue