Skip to content

Commit 943d2a8

Browse files
committed
Auto merge of #14642 - jakhh8:master, r=Veykril
minor: Use `CargoConfig.extra_args` for fetching metadata Fixes #14510
2 parents 59fcd00 + 62c9d96 commit 943d2a8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

crates/project-model/src/cargo_workspace.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,16 @@ impl CargoWorkspace {
293293
}
294294
meta.current_dir(current_dir.as_os_str());
295295

296+
let mut other_options = config.extra_args.clone();
296297
if !targets.is_empty() {
297-
let other_options: Vec<_> = targets
298-
.into_iter()
299-
.flat_map(|target| ["--filter-platform".to_string(), target])
300-
.collect();
301-
meta.other_options(other_options);
298+
other_options.append(
299+
&mut targets
300+
.into_iter()
301+
.flat_map(|target| ["--filter-platform".to_string(), target])
302+
.collect(),
303+
);
302304
}
305+
meta.other_options(other_options);
303306

304307
// FIXME: Fetching metadata is a slow process, as it might require
305308
// calling crates.io. We should be reporting progress here, but it's

0 commit comments

Comments
 (0)