Skip to content

Commit 373fbf7

Browse files
committed
chore: Upgrade termtree
1 parent d88c338 commit 373fbf7

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

Cargo.lock

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ concolor-clap = { version = "0.0.9", features = ["api_unstable"] }
3939
proc-exit = "1"
4040
eyre = "0.6"
4141
human-panic = "1"
42-
termtree = "0.2.4"
42+
termtree = "0.4"
4343
indexmap = "1"
4444

4545
git2-ext = "0.0.5"

src/bin/git-stack/stack.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ impl<'r> Tree<'r> {
13001300
node: Some(self.root),
13011301
palette,
13021302
};
1303-
let mut tree = termtree::Tree::root(root).with_glyphs(GLYPHS);
1303+
let mut tree = termtree::Tree::new(root).with_glyphs(GLYPHS);
13041304
let joint = RenderNode {
13051305
repo,
13061306
head_branch,
@@ -1311,7 +1311,7 @@ impl<'r> Tree<'r> {
13111311
let stacks_len = self.stacks.len();
13121312
for (i, stack) in self.stacks.into_iter().enumerate() {
13131313
if i < stacks_len - 1 {
1314-
let mut stack_tree = termtree::Tree::root(joint).with_glyphs(JOINT_GLYPHS);
1314+
let mut stack_tree = termtree::Tree::new(joint).with_glyphs(JOINT_GLYPHS);
13151315
for child_tree in stack.into_iter() {
13161316
stack_tree.push(child_tree.into_display(
13171317
repo,
@@ -1325,7 +1325,7 @@ impl<'r> Tree<'r> {
13251325
let stack_len = stack.len();
13261326
for (j, child_tree) in stack.into_iter().enumerate() {
13271327
if i != 0 && j == 0 {
1328-
tree.push(termtree::Tree::root(joint).with_glyphs(SPACE_GLYPHS));
1328+
tree.push(termtree::Tree::new(joint).with_glyphs(SPACE_GLYPHS));
13291329
}
13301330
let child = RenderNode {
13311331
repo,
@@ -1334,11 +1334,11 @@ impl<'r> Tree<'r> {
13341334
node: Some(child_tree.root),
13351335
palette,
13361336
};
1337-
tree.push(termtree::Tree::root(child).with_glyphs(GLYPHS));
1337+
tree.push(termtree::Tree::new(child).with_glyphs(GLYPHS));
13381338
if !child_tree.stacks.is_empty() {
13391339
for child_stack in child_tree.stacks.into_iter() {
13401340
let mut stack_tree =
1341-
termtree::Tree::root(joint).with_glyphs(JOINT_GLYPHS);
1341+
termtree::Tree::new(joint).with_glyphs(JOINT_GLYPHS);
13421342
for child_tree in child_stack.into_iter() {
13431343
stack_tree.push(child_tree.into_display(
13441344
repo,
@@ -1350,7 +1350,7 @@ impl<'r> Tree<'r> {
13501350
tree.push(stack_tree);
13511351
}
13521352
if j < stack_len {
1353-
tree.push(termtree::Tree::root(joint).with_glyphs(SPACE_GLYPHS));
1353+
tree.push(termtree::Tree::new(joint).with_glyphs(SPACE_GLYPHS));
13541354
}
13551355
}
13561356
}

0 commit comments

Comments
 (0)