Skip to content

Commit afe9403

Browse files
authored
Rollup merge of #134251 - bjorn3:various_cleanups2, r=oli-obk
A bunch of cleanups (part 2) Just like rust-lang/rust#133567 these were all found while looking at the respective code, but are not blocking any other changes I want to make in the short term.
2 parents 7f3636c + a67498d commit afe9403

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/helpers.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ pub fn iter_exported_symbols<'tcx>(
149149
let dependency_formats = tcx.dependency_formats(());
150150
// Find the dependencies of the executable we are running.
151151
let dependency_format = dependency_formats
152-
.iter()
153-
.find(|(crate_type, _)| *crate_type == CrateType::Executable)
152+
.get(&CrateType::Executable)
154153
.expect("interpreting a non-executable crate");
155-
for cnum in dependency_format.1.iter().enumerate().filter_map(|(num, &linkage)| {
154+
for cnum in dependency_format.iter().enumerate().filter_map(|(num, &linkage)| {
156155
// We add 1 to the number because that's what rustc also does everywhere it
157156
// calls `CrateNum::new`...
158157
#[expect(clippy::arithmetic_side_effects)]

0 commit comments

Comments
 (0)