Skip to content

Commit

Permalink
Small tweaking of --indent implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 committed Mar 13, 2024
1 parent c1de410 commit 0152ee3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jaq/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ struct Cli {
#[arg(short, long)]
compact_output: bool,

/// use n spaces for indentation
/// Use n spaces for indentation
#[arg(long, value_name = "n", default_value_t = 2)]
indent: u8,
indent: usize,

/// Use tabs for indentation rather than spaces
#[arg(long)]
Expand Down Expand Up @@ -451,7 +451,7 @@ fn print(cli: &Cli, val: Val, writer: &mut impl Write) -> io::Result<()> {
let indent = if cli.tab {
String::from("\t")
} else {
" ".repeat(cli.indent.into())
" ".repeat(cli.indent)
};

// this looks ugly, but it is hard to abstract over the `Formatter` because
Expand Down

0 comments on commit 0152ee3

Please sign in to comment.