Skip to content

Commit

Permalink
Fixed issue where termsize was glitched on release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nidnogg committed Jul 5, 2024
1 parent 40c71e8 commit fa7c9dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 66 deletions.
70 changes: 11 additions & 59 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zeitfetch"
version = "0.1.11"
version = "0.1.12"
edition = "2021"
authors = ["Henrique V (nidnogg)"]
description = "Instantaneous snapshots of cross-platform system information"
Expand All @@ -22,7 +22,7 @@ serde_json = "1.0.95"
strum = "0.25.0"
strum_macros = "0.25.3"
sysinfo = "0.29.11"
termsize = "0.1.6"
termsize = "0.1.8"
unicode-segmentation = "1.10.1"

[target.'cfg(windows)'.dependencies]
Expand Down
5 changes: 0 additions & 5 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ impl Ctx {
let args = Args::parse_args();
let width: Option<usize> =
termsize::get().map(|w| if w.cols == 0 { 80 } else { w.cols.into() });
// TO-DO debug why termsize is unable to set width with cargo build --release. This commented code results in rows 0 cols 0.
// See https://github.com/nidnogg/zeitfetch/issues/14 for more details.
// termsize::get().map(|size| {
// println!("rows {} cols {}", size.rows, size.cols)
// });
Ctx { width, args }
}
}
Expand Down

0 comments on commit fa7c9dc

Please sign in to comment.