Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanarijit committed May 28, 2023
1 parent 2b4a657 commit 0f4b231
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ impl Cli {

pub fn process(self) -> Result<String, jf::Error> {
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)),
}
}
}
Expand Down

0 comments on commit 0f4b231

Please sign in to comment.