mirror of
https://github.com/Noratrieb/jsonformat.git
synced 2026-01-14 22:25:01 +01:00
binary cleanup
This commit is contained in:
parent
c5e63a743a
commit
35332a1b26
7 changed files with 59 additions and 31 deletions
|
|
@ -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