From cbfd9f5b419b816b767d3871360d64f98a306a41 Mon Sep 17 00:00:00 2001 From: David Peter Date: Sun, 22 Aug 2021 19:04:22 +0200 Subject: [PATCH] Move DEFAULT_SHELL to options --- src/hyperfine/options.rs | 11 +++++++---- src/hyperfine/types.rs | 6 ------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/hyperfine/options.rs b/src/hyperfine/options.rs index fdb7e7b..44abf7c 100644 --- a/src/hyperfine/options.rs +++ b/src/hyperfine/options.rs @@ -1,7 +1,10 @@ -use super::{ - types::DEFAULT_SHELL, - units::{Second, Unit}, -}; +use super::units::{Second, Unit}; + +#[cfg(not(windows))] +pub const DEFAULT_SHELL: &str = "sh"; + +#[cfg(windows)] +pub const DEFAULT_SHELL: &str = "cmd.exe"; /// Action to take when an executed command fails. #[derive(Debug, Clone, Copy, PartialEq)] diff --git a/src/hyperfine/types.rs b/src/hyperfine/types.rs index 8089f2b..2fc8351 100644 --- a/src/hyperfine/types.rs +++ b/src/hyperfine/types.rs @@ -8,12 +8,6 @@ use rust_decimal::Decimal; use crate::hyperfine::units::Second; -#[cfg(not(windows))] -pub const DEFAULT_SHELL: &str = "sh"; - -#[cfg(windows)] -pub const DEFAULT_SHELL: &str = "cmd.exe"; - #[derive(Debug, Clone, Serialize, Copy, PartialEq, Eq)] #[serde(untagged)] pub enum NumericType {