summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2023-11-07 22:02:23 +0100
committerqkzk <qu3nt1n@gmail.com>2023-11-07 22:02:23 +0100
commitab4a400885593bd1fd086bb89eac24d6f494589d (patch)
treee55554c0127c1edb5c92aad071adffe7cfa55ef5
parentfa0f1190f65391b4c03f2907c14e4efa33b293d2 (diff)
FIX: poor aligment of prefixes in tree
-rw-r--r--src/tree.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tree.rs b/src/tree.rs
index 2feebcd..f495acb 100644
--- a/src/tree.rs
+++ b/src/tree.rs
@@ -569,8 +569,8 @@ impl Tree {
#[inline]
fn first_prefix(mut prefix: String) -> String {
prefix.push(' ');
- prefix = prefix.replace("└──", " ");
- prefix = prefix.replace("├──", "│ ");
+ prefix = prefix.replace("└──", " ");
+ prefix = prefix.replace("├──", "│ ");
prefix.push_str("└──");
prefix
}
@@ -578,8 +578,8 @@ fn first_prefix(mut prefix: String) -> String {
#[inline]
fn other_prefix(mut prefix: String) -> String {
prefix.push(' ');
- prefix = prefix.replace("└──", " ");
- prefix = prefix.replace("├──", "│ ");
+ prefix = prefix.replace("└──", " ");
+ prefix = prefix.replace("├──", "│ ");
prefix.push_str("├──");
prefix
}