Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed May 23, 2023
1 parent db999d9 commit 458e9b2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ fn indent_block_with_lines(
for _ in 1..indent_amount {
buf.push_str(LINE_HORIZ);
}
buf.push_str(" ");
buf.push(' ');
for i in 0..(indent_amount - 1) {
indent(&mut s, i)
}
Expand All @@ -327,7 +327,7 @@ fn indent_block_with_lines(
for _ in 1..indent_amount {
buf.push_str(LINE_HORIZ);
}
buf.push_str(" ");
buf.push(' ');

if indent_spaces != 0 {
for i in 0..indent_amount {
Expand Down Expand Up @@ -363,7 +363,7 @@ fn indent_block_with_lines(
for _ in 1..indent_amount {
buf.push_str(LINE_HORIZ);
}
buf.push_str(" ");
buf.push(' ');
if indent_spaces != 0 {
for i in 0..indent_amount {
indent(&mut s, i)
Expand Down Expand Up @@ -402,15 +402,15 @@ fn indent_block_with_lines(
// We don't have the space for fancy rendering at single space indent.
if indent_amount > 1 {
if lines.len() > 1 {
buf.push_str("┴");
buf.push('┴');
for _ in 1..indent_amount - 1 {
buf.push_str(LINE_HORIZ);
}
buf.push_str("┬");
buf.push('┬');
for _ in 1..indent_amount {
buf.push_str(LINE_HORIZ);
}
buf.push_str(" ");
buf.push(' ');

if indent_spaces != 0 {
for i in 0..indent_amount - 1 {
Expand All @@ -430,15 +430,15 @@ fn indent_block_with_lines(
buf.push_str(LINE_HORIZ);
}
if lines.len() > 1 {
buf.push_str("┴");
buf.push('┴');
for _ in 1..indent_amount - 1 {
buf.push_str(LINE_HORIZ);
}
buf.push_str("┬");
buf.push('┬');
for _ in 1..indent_amount {
buf.push_str(LINE_HORIZ);
}
buf.push_str(" ");
buf.push(' ');
for i in 0..indent_amount - 2 {
indent(&mut s, i)
}
Expand Down Expand Up @@ -489,7 +489,7 @@ fn indent_block_with_lines(
// Magic number `2` means "last entry" because we iterate from `1`
// and then restart indexing at `0`.
if i == lines.len() - 2 {
buf.push_str("└");
buf.push('└');
} else {
buf.push_str(LINE_BRANCH);
}
Expand Down

0 comments on commit 458e9b2

Please sign in to comment.