about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/driver/jit.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-12 14:44:18 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-13 11:29:15 +0000
commit3198496385cd8fdd89818e0bf14bacd8db6292d9 (patch)
tree4bffde0746522df9732c8ca0816787a8b1df28fa /compiler/rustc_codegen_cranelift/src/driver/jit.rs
parentea9e8c13dc94949ab38370c39559110da33c878f (diff)
downloadrust-3198496385cd8fdd89818e0bf14bacd8db6292d9.tar.gz
rust-3198496385cd8fdd89818e0bf14bacd8db6292d9.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/driver/jit.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/jit.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/jit.rs b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
index d68948966ea..4be4291021d 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/jit.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
@@ -287,12 +287,7 @@ fn dep_symbol_lookup_fn(
 
     let mut dylib_paths = Vec::new();
 
-    let data = &crate_info
-        .dependency_formats
-        .iter()
-        .find(|(crate_type, _data)| *crate_type == rustc_session::config::CrateType::Executable)
-        .unwrap()
-        .1;
+    let data = &crate_info.dependency_formats[&rustc_session::config::CrateType::Executable].1;
     // `used_crates` is in reverse postorder in terms of dependencies. Reverse the order here to
     // get a postorder which ensures that all dependencies of a dylib are loaded before the dylib
     // itself. This helps the dynamic linker to find dylibs not in the regular dynamic library