Skip to content

Commit c99d4f0

Browse files
committed
Make dependency_formats an FxIndexMap rather than a list of tuples
It is treated as a map already. This is using FxIndexMap rather than UnordMap because the latter doesn't provide an api to pick a single value iff all values are equal, which each_linked_rlib depends on.
1 parent 37b47f9 commit c99d4f0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/driver/jit.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,7 @@ fn dep_symbol_lookup_fn(
287287

288288
let mut dylib_paths = Vec::new();
289289

290-
let data = &crate_info
291-
.dependency_formats
292-
.iter()
293-
.find(|(crate_type, _data)| *crate_type == rustc_session::config::CrateType::Executable)
294-
.unwrap()
295-
.1;
290+
let data = &crate_info.dependency_formats[&rustc_session::config::CrateType::Executable].1;
296291
// `used_crates` is in reverse postorder in terms of dependencies. Reverse the order here to
297292
// get a postorder which ensures that all dependencies of a dylib are loaded before the dylib
298293
// itself. This helps the dynamic linker to find dylibs not in the regular dynamic library

0 commit comments

Comments
 (0)