mirror of
https://github.com/Noratrieb/jsonformat.git
synced 2026-01-14 14:15:03 +01:00
binary cleanup
This commit is contained in:
parent
c5e63a743a
commit
35332a1b26
7 changed files with 59 additions and 31 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue