mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-27 15:12:56 +00:00
Deduplicate info.used_crate_source indexing
This commit is contained in:
parent
8748e37d35
commit
5added38c9
@ -263,9 +263,10 @@ pub fn each_linked_rlib(
|
||||
None => return Err("could not find formats for rlibs".to_string()),
|
||||
}
|
||||
let name = &info.crate_name[&cnum];
|
||||
let path = if let Some((path, _)) = &info.used_crate_source[&cnum].rlib {
|
||||
let used_crate_source = &info.used_crate_source[&cnum];
|
||||
let path = if let Some((path, _)) = &used_crate_source.rlib {
|
||||
path
|
||||
} else if info.used_crate_source[&cnum].rmeta.is_some() {
|
||||
} else if used_crate_source.rmeta.is_some() {
|
||||
return Err(format!(
|
||||
"could not find rlib for: `{}`, found rmeta (metadata) file",
|
||||
name
|
||||
|
Loading…
Reference in New Issue
Block a user