Skip to content

Commit 62c9d96

Browse files
committed
fix
1 parent f502169 commit 62c9d96

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

crates/project-model/src/cargo_workspace.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -293,14 +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-
.chain(config.extra_args.clone())
301-
.collect();
302-
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+
);
303304
}
305+
meta.other_options(other_options);
304306

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

0 commit comments

Comments
 (0)