From 0f4b2317463a1c5f3b0989902726810e5a30a06b Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Sun, 28 May 2023 10:08:52 +0530 Subject: [PATCH] Minor cleanup --- Cargo.lock | 2 +- src/cli.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a260ec5..2ddcdd5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -32,7 +32,7 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jf" -version = "0.5.1" +version = "0.6.0" dependencies = [ "serde_json", "serde_yaml", diff --git a/src/cli.rs b/src/cli.rs index ee8486f..9ff1008 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -62,14 +62,14 @@ impl Cli { pub fn process(self) -> Result { match self { - Cli::Help => Ok(jf::USAGE.into()), - Cli::Version => Ok(format!("jf {VERSION}")), - Cli::Format(Format::Raw, args) => jf::render(args.map(Into::into)), - Cli::Format(Format::Json, args) => jf::format(args.map(Into::into)), - Cli::Format(Format::PrettyJson, args) => { + Self::Help => Ok(jf::USAGE.into()), + Self::Version => Ok(format!("jf {VERSION}")), + Self::Format(Format::Raw, args) => jf::render(args.map(Into::into)), + Self::Format(Format::Json, args) => jf::format(args.map(Into::into)), + Self::Format(Format::PrettyJson, args) => { jf::format_pretty(args.map(Into::into)) } - Cli::Format(Format::Yaml, args) => jf::format_yaml(args.map(Into::into)), + Self::Format(Format::Yaml, args) => jf::format_yaml(args.map(Into::into)), } } }