mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-29 00:28:57 +00:00
fmt: apply cargo fmt suggestions
This commit is contained in:
1 parent
bece2eacf0
commit
c2f99e5f94
2 files changed
+9
-15
No files matched your search
@@ -1,3 +1,4 @@
|
||||
#[cfg(windows)]
|
||||
use std::os::windows::process::CommandExt;
|
||||
use std::process::ExitStatus;
|
||||
|
||||
@@ -136,21 +137,14 @@ impl<'a> Executor for ShellExecutor<'a> {
|
||||
) -> Result<(TimingResult, ExitStatus)> {
|
||||
let on_windows_cmd = cfg!(windows) && *self.shell == Shell::Default("cmd.exe");
|
||||
let mut command_builder = self.shell.command();
|
||||
command_builder
|
||||
.arg(
|
||||
if on_windows_cmd {
|
||||
"/C"
|
||||
} else {
|
||||
"-c"
|
||||
},
|
||||
);
|
||||
command_builder.arg(if on_windows_cmd { "/C" } else { "-c" });
|
||||
|
||||
// Windows needs special treatment for its behavior on parsing cmd arguments
|
||||
if on_windows_cmd {
|
||||
command_builder.raw_arg(command.get_command_line());
|
||||
} else {
|
||||
command_builder.arg(command.get_command_line());
|
||||
}
|
||||
// Windows needs special treatment for its behavior on parsing cmd arguments
|
||||
if on_windows_cmd {
|
||||
command_builder.raw_arg(command.get_command_line());
|
||||
} else {
|
||||
command_builder.arg(command.get_command_line());
|
||||
}
|
||||
|
||||
let mut result = run_command_and_measure_common(
|
||||
command_builder,
|
||||
|
||||
@@ -440,4 +440,4 @@ fn windows_quote_before_quote_args() {
|
||||
.arg("dir \"..\\src\\\" \"..\\tests\\\"")
|
||||
.assert()
|
||||
.success();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user