Skip to content

Commit e41fd3a

Browse files
authored
Merge pull request #1297 from romanstingler/terminal-size
update terminal-size crate dependency
2 parents 51cd311 + c15f83c commit e41fd3a

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

Cargo.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ serde = { version = "1.0.215", features = ["derive"] }
4141
serde_json = "1.0.132"
4242
smart-default = "0.7.1"
4343
tempfile = "3.14.0"
44-
terminal_size = "0.3.0"
44+
terminal_size = "0.4.1"
4545
tokio = { version = "1.41.1", features = [
4646
"process",
4747
"macros",

src/info.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::os::fd::AsRawFd;
2-
31
use crate::config::{Colors, Config};
42
use crate::download::cache_info_with_warnings;
53
use crate::exec;
@@ -13,7 +11,7 @@ use anyhow::Error;
1311
use globset::GlobSet;
1412
use raur::ArcPackage as Package;
1513
use srcinfo::ArchVec;
16-
use terminal_size::terminal_size_using_fd;
14+
use terminal_size::terminal_size_of;
1715
use tr::tr;
1816
use unicode_width::UnicodeWidthStr;
1917

@@ -301,5 +299,5 @@ fn print_info<'a>(
301299

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

0 commit comments

Comments
 (0)