Skip to content

Commit 84d4e85

Browse files
committed
Apply indentation nits
1 parent d54d613 commit 84d4e85

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

src/cargo/core/compiler/standard_lib.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -165,40 +165,40 @@ pub fn generate_std_roots(
165165
})
166166
.collect();
167167

168-
for kinds in package_set
168+
for kind in package_set
169169
.packages()
170-
.map(|pkg| pkg.explicit_kinds(requested_kinds, explicit_host_kind))
170+
.flat_map(|pkg| pkg.explicit_kinds(requested_kinds, explicit_host_kind))
171171
{
172-
for kind in kinds {
173-
if let Entry::Vacant(e) = ret.entry(kind) {
174-
let units = std_pkg_infos.iter().map(|(pkg, lib, unit_for, features)| {
175-
// I don't think we need to bother with Check here, the difference
176-
// in time is minimal, and the difference in caching is
177-
// significant.
178-
let mode = CompileMode::Build;
179-
let profile = profiles.get_profile(
180-
pkg.package_id(),
181-
/*is_member*/ false,
182-
/*is_local*/ false,
183-
*unit_for,
184-
mode,
185-
kind,
186-
);
187-
interner.intern(
188-
pkg,
189-
lib,
190-
profile,
191-
kind,
192-
mode,
193-
features.clone(),
194-
/*is_std*/ true,
195-
/*dep_hash*/ 0,
196-
)
197-
});
172+
let e = match ret.entry(kind) {
173+
Entry::Vacant(e) => e,
174+
Entry::Occupied(_) => continue,
175+
};
176+
let units = std_pkg_infos.iter().map(|(pkg, lib, unit_for, features)| {
177+
// I don't think we need to bother with Check here, the difference
178+
// in time is minimal, and the difference in caching is
179+
// significant.
180+
let mode = CompileMode::Build;
181+
let profile = profiles.get_profile(
182+
pkg.package_id(),
183+
/*is_member*/ false,
184+
/*is_local*/ false,
185+
*unit_for,
186+
mode,
187+
kind,
188+
);
189+
interner.intern(
190+
pkg,
191+
lib,
192+
profile,
193+
kind,
194+
mode,
195+
features.clone(),
196+
/*is_std*/ true,
197+
/*dep_hash*/ 0,
198+
)
199+
});
198200

199-
e.insert(units.collect());
200-
}
201-
}
201+
e.insert(units.collect());
202202
}
203203

204204
Ok(ret)

0 commit comments

Comments
 (0)