mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-03 01:21:25 +00:00
fmt: apply cargo fmt suggestions
This commit is contained in:
1 parent
bece2eacf0
commit
c2f99e5f94
1 file changed
+2
-8
@@ -1,3 +1,4 @@
|
|||||||
|
#[cfg(windows)]
|
||||||
use std::os::windows::process::CommandExt;
|
use std::os::windows::process::CommandExt;
|
||||||
use std::process::ExitStatus;
|
use std::process::ExitStatus;
|
||||||
|
|
||||||
@@ -136,14 +137,7 @@ impl<'a> Executor for ShellExecutor<'a> {
|
|||||||
) -> Result<(TimingResult, ExitStatus)> {
|
) -> Result<(TimingResult, ExitStatus)> {
|
||||||
let on_windows_cmd = cfg!(windows) && *self.shell == Shell::Default("cmd.exe");
|
let on_windows_cmd = cfg!(windows) && *self.shell == Shell::Default("cmd.exe");
|
||||||
let mut command_builder = self.shell.command();
|
let mut command_builder = self.shell.command();
|
||||||
command_builder
|
command_builder.arg(if on_windows_cmd { "/C" } else { "-c" });
|
||||||
.arg(
|
|
||||||
if on_windows_cmd {
|
|
||||||
"/C"
|
|
||||||
} else {
|
|
||||||
"-c"
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
// Windows needs special treatment for its behavior on parsing cmd arguments
|
// Windows needs special treatment for its behavior on parsing cmd arguments
|
||||||
if on_windows_cmd {
|
if on_windows_cmd {
|
||||||
|
|||||||
Reference in new issue
Block a user