Skip to content
Myr

fmt: apply cargo fmt suggestions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Pedro Witzel · committed by David Peter · parent bece2ea · Browse files · 2 files+9 added−15 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−15 removed

  • tests:+1 added−1 removed
  • other:+8 added−14 removed

2 files+9 added−15 removed

modified:src/benchmark/executor.rs+8 added-14 removed
1#[cfg(windows)]2use std::os::windows::process::CommandExt;3use std::process::ExitStatus;45use crate::command::Command;
130 unmodified lines
136 command_failure_action: Option<CmdFailureAction>,137 ) -> Result<(TimingResult, ExitStatus)> {138 let on_windows_cmd = cfg!(windows) && *self.shell == Shell::Default("cmd.exe");139 let mut command_builder = self.shell.command();139 command_builder140 .arg(141 if on_windows_cmd {142 "/C"143 } else {144 "-c"145 },146 );140 command_builder.arg(if on_windows_cmd { "/C" } else { "-c" });141148 // Windows needs special treatment for its behavior on parsing cmd arguments149 if on_windows_cmd {150 command_builder.raw_arg(command.get_command_line());151 } else {152 command_builder.arg(command.get_command_line());153 }142 // Windows needs special treatment for its behavior on parsing cmd arguments143 if on_windows_cmd {144 command_builder.raw_arg(command.get_command_line());145 } else {146 command_builder.arg(command.get_command_line());147 }148149 let mut result = run_command_and_measure_common(150 command_builder,151 command_failure_action.unwrap_or(self.options.command_failure_action),
150 unmodified lines
modified:tests/integration_tests.rs+1 added-1 removed
438 unmodified lines
439 hyperfine()440 .arg("dir \"..\\src\\\" \"..\\tests\\\"")441 .assert()442 .success();443}443}