Skip to content

Commit

Permalink
Remove ops::run_os, change ops::run to take &[OsString] directly.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbartholomew committed Apr 15, 2019
1 parent 3ab8407 commit 6d066a6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
};
}
};
match ops::run_os(&ws, &compile_opts, &values_os(args, "args"))? {
match ops::run(&ws, &compile_opts, &values_os(args, "args"))? {
None => Ok(()),
Some(err) => {
// If we never actually spawned the process then that sounds pretty
Expand Down
9 changes: 0 additions & 9 deletions src/cargo/ops/cargo_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ use crate::ops;
use crate::util::{CargoResult, ProcessError};

pub fn run(
ws: &Workspace<'_>,
options: &ops::CompileOptions<'_>,
args: &[String],
) -> CargoResult<Option<ProcessError>> {
let osargs: Vec<OsString> = args.iter().map(|s| OsString::from(s)).collect();
run_os(ws, options, osargs.as_slice())
}

pub fn run_os(
ws: &Workspace<'_>,
options: &ops::CompileOptions<'_>,
args: &[OsString],
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub use self::cargo_output_metadata::{output_metadata, ExportInfo, OutputMetadat
pub use self::cargo_package::{package, PackageOpts};
pub use self::cargo_pkgid::pkgid;
pub use self::cargo_read_manifest::{read_package, read_packages};
pub use self::cargo_run::{run, run_os};
pub use self::cargo_run::run;
pub use self::cargo_test::{run_benches, run_tests, TestOptions};
pub use self::cargo_uninstall::uninstall;
pub use self::fix::{fix, fix_maybe_exec_rustc, FixOptions};
Expand Down

0 comments on commit 6d066a6

Please sign in to comment.