Skip to content

Commit 43df992

Browse files
committed
chore: replace term_size with terminal_size
1 parent 8713075 commit 43df992

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Cargo.lock

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

crates/volta-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mock-network = ["mockito"]
1313
cross-platform-docs = []
1414

1515
[dependencies]
16-
term_size = "0.3.2"
16+
terminal_size = "0.3.0"
1717
indicatif = "0.17.7"
1818
console = ">=0.11.3, <1.0.0"
1919
readext = "0.1.0"

crates/volta-core/src/style.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ where
4949

5050
/// Get the width of the terminal, limited to a maximum of MAX_WIDTH
5151
pub fn text_width() -> Option<usize> {
52-
term_size::dimensions().map(|(w, _)| w.min(MAX_WIDTH))
52+
use terminal_size::Width;
53+
terminal_size::terminal_size().map(|(Width(w), _)| (w as usize).min(MAX_WIDTH))
5354
}
5455

5556
/// Constructs a command-line progress bar based on the specified Origin enum

0 commit comments

Comments
 (0)