Skip to content

Commit 6d066a6

Browse files
Remove ops::run_os, change ops::run to take &[OsString] directly.
1 parent 3ab8407 commit 6d066a6

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

src/bin/cargo/commands/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
7272
};
7373
}
7474
};
75-
match ops::run_os(&ws, &compile_opts, &values_os(args, "args"))? {
75+
match ops::run(&ws, &compile_opts, &values_os(args, "args"))? {
7676
None => Ok(()),
7777
Some(err) => {
7878
// If we never actually spawned the process then that sounds pretty

src/cargo/ops/cargo_run.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@ use crate::ops;
77
use crate::util::{CargoResult, ProcessError};
88

99
pub fn run(
10-
ws: &Workspace<'_>,
11-
options: &ops::CompileOptions<'_>,
12-
args: &[String],
13-
) -> CargoResult<Option<ProcessError>> {
14-
let osargs: Vec<OsString> = args.iter().map(|s| OsString::from(s)).collect();
15-
run_os(ws, options, osargs.as_slice())
16-
}
17-
18-
pub fn run_os(
1910
ws: &Workspace<'_>,
2011
options: &ops::CompileOptions<'_>,
2112
args: &[OsString],

src/cargo/ops/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub use self::cargo_output_metadata::{output_metadata, ExportInfo, OutputMetadat
1212
pub use self::cargo_package::{package, PackageOpts};
1313
pub use self::cargo_pkgid::pkgid;
1414
pub use self::cargo_read_manifest::{read_package, read_packages};
15-
pub use self::cargo_run::{run, run_os};
15+
pub use self::cargo_run::run;
1616
pub use self::cargo_test::{run_benches, run_tests, TestOptions};
1717
pub use self::cargo_uninstall::uninstall;
1818
pub use self::fix::{fix, fix_maybe_exec_rustc, FixOptions};

0 commit comments

Comments
 (0)