From d13adea1958081e430703be84829b3c03c5f3e26 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 4 Jun 2019 13:33:18 +0530 Subject: [PATCH] Rename 'human*' formats to their non-prefixed counterpart This makes more sense, and is more comfortable. --- src/options.rs | 12 ++++++------ tests/stateless-journey.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/options.rs b/src/options.rs index 6d686c76..c3041bd5 100644 --- a/src/options.rs +++ b/src/options.rs @@ -5,8 +5,8 @@ use structopt::{clap::arg_enum, StructOpt}; arg_enum! { #[derive(PartialEq, Debug)] pub enum ByteFormat { - HumanMetric, - HumanBinary, + Metric, + Binary, Bytes } } @@ -14,8 +14,8 @@ arg_enum! { impl From for LibraryByteFormat { fn from(input: ByteFormat) -> Self { match input { - ByteFormat::HumanMetric => LibraryByteFormat::Metric, - ByteFormat::HumanBinary => LibraryByteFormat::Binary, + ByteFormat::Metric => LibraryByteFormat::Metric, + ByteFormat::Binary => LibraryByteFormat::Binary, ByteFormat::Bytes => LibraryByteFormat::Bytes, } } @@ -34,8 +34,8 @@ pub struct Args { pub threads: Option, /// The format with which to print byte counts. - /// HumanMetric - uses 1000 as base (default) - /// HumanBinary - uses 1024 as base + /// Metric - uses 1000 as base (default) + /// Binary - uses 1024 as base /// Bytes - plain bytes without any formatting #[structopt(short = "f", long = "format")] pub format: Option, diff --git a/tests/stateless-journey.sh b/tests/stateless-journey.sh index 6c112b7d..e5e39b22 100755 --- a/tests/stateless-journey.sh +++ b/tests/stateless-journey.sh @@ -85,7 +85,7 @@ WITH_FAILURE=1 (with "human-binary" it "produces a human-readable aggregate of the current directory, without total" && { WITH_SNAPSHOT="$snapshot/success-bytes-binary" \ - expect_run ${SUCCESSFULLY} "$exe" --format humanbinary + expect_run ${SUCCESSFULLY} "$exe" --format binary } ) (with "bytes"