Use IntoIterator for array impl everywhere.
This commit is contained in:
parent
b34cf1a9e1
commit
1acb44f03c
21 changed files with 41 additions and 50 deletions
|
@ -795,12 +795,11 @@ impl Session {
|
|||
/// Returns a list of directories where target-specific tool binaries are located.
|
||||
pub fn get_tools_search_paths(&self, self_contained: bool) -> Vec<PathBuf> {
|
||||
let rustlib_path = rustc_target::target_rustlib_path(&self.sysroot, &config::host_triple());
|
||||
let p = std::array::IntoIter::new([
|
||||
let p = PathBuf::from_iter([
|
||||
Path::new(&self.sysroot),
|
||||
Path::new(&rustlib_path),
|
||||
Path::new("bin"),
|
||||
])
|
||||
.collect::<PathBuf>();
|
||||
]);
|
||||
if self_contained { vec![p.clone(), p.join("self-contained")] } else { vec![p] }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue