Skip to content

Commit

Permalink
update terminal-size
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Stingler committed Dec 17, 2024
1 parent c9c4a23 commit c15f83c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.132"
smart-default = "0.7.1"
tempfile = "3.14.0"
terminal_size = "0.3.0"
terminal_size = "0.4.1"
tokio = { version = "1.41.1", features = [
"process",
"macros",
Expand Down
6 changes: 2 additions & 4 deletions src/info.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::os::fd::AsRawFd;

use crate::config::{Colors, Config};
use crate::download::cache_info_with_warnings;
use crate::exec;
Expand All @@ -13,7 +11,7 @@ use anyhow::Error;
use globset::GlobSet;
use raur::ArcPackage as Package;
use srcinfo::ArchVec;
use terminal_size::terminal_size_using_fd;
use terminal_size::terminal_size_of;
use tr::tr;
use unicode_width::UnicodeWidthStr;

Expand Down Expand Up @@ -301,5 +299,5 @@ fn print_info<'a>(

#[must_use]
pub fn get_terminal_width() -> Option<usize> {
terminal_size_using_fd(std::io::stdout().as_raw_fd()).map(|(w, _h)| w.0 as usize)
terminal_size_of(std::io::stdout()).map(|(w, _h)| w.0 as usize)
}

0 comments on commit c15f83c

Please sign in to comment.