binary cleanup

This commit is contained in:
nora 2022-04-28 21:09:50 +02:00
parent c5e63a743a
commit 35332a1b26
7 changed files with 59 additions and 31 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "jsonformat-cli"
version = "0.1.0"
version = "0.2.0"
authors = ["Nilstrieb <nilstrieb@gmail.com>"]
edition = "2021"
license = "MIT"

View file

@ -12,10 +12,13 @@ use jsonformat::{format_reader_writer, Indentation};
#[derive(Parser)]
#[clap(author, about, version)]
struct Options {
/// The indentation, s will replaced by a space and t by a tab. ss is the default.
#[clap(short, long)]
indentation: Option<String>,
#[clap(short, long)]
/// The output file
output: Option<PathBuf>,
/// The input file
input: Option<PathBuf>,
}
@ -51,7 +54,7 @@ fn main() -> anyhow::Result<()> {
let indent = match replaced_indent {
Some(ref str) => Indentation::Custom(str),
None => Indentation::Default,
None => Indentation::TwoSpace,
};
// Note: on-stack dynamic dispatch