Deduplicate info.used_crate_source indexing
This commit is contained in:
parent
8748e37d35
commit
5added38c9
1 changed files with 3 additions and 2 deletions
|
@ -263,9 +263,10 @@ pub fn each_linked_rlib(
|
||||||
None => return Err("could not find formats for rlibs".to_string()),
|
None => return Err("could not find formats for rlibs".to_string()),
|
||||||
}
|
}
|
||||||
let name = &info.crate_name[&cnum];
|
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
|
path
|
||||||
} else if info.used_crate_source[&cnum].rmeta.is_some() {
|
} else if used_crate_source.rmeta.is_some() {
|
||||||
return Err(format!(
|
return Err(format!(
|
||||||
"could not find rlib for: `{}`, found rmeta (metadata) file",
|
"could not find rlib for: `{}`, found rmeta (metadata) file",
|
||||||
name
|
name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue