Make a lock get dropped sooner

This commit is contained in:
Richard Feldman 2022-11-20 07:08:10 -05:00
parent 2cc6a16dd1
commit 291e6cce73
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -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 {