Auto merge of #121448 - klensy:bump-22-02-24, r=clubby789

bump few deps

Bumps `sysinfo`, `tabled`; dedupes `env_logger`; drops `is-terminal`
https://github.com/zhiburt/tabled/blob/v0.15.1/CHANGELOG.md
https://github.com/GuillaumeGomez/sysinfo/blob/v0.30.5/CHANGELOG.md
This commit is contained in:
bors 2024-02-23 07:42:50 +00:00
commit 6dadb6eb23
5 changed files with 21 additions and 45 deletions

View File

@ -1224,19 +1224,6 @@ dependencies = [
"regex",
]
[[package]]
name = "env_logger"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580"
dependencies = [
"humantime",
"is-terminal",
"log",
"regex",
"termcolor",
]
[[package]]
name = "env_logger"
version = "0.11.2"
@ -2058,17 +2045,6 @@ version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
[[package]]
name = "is-terminal"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.52.0",
]
[[package]]
name = "itertools"
version = "0.11.0"
@ -2364,7 +2340,7 @@ dependencies = [
"clap",
"clap_complete",
"elasticlunr-rs",
"env_logger 0.11.2",
"env_logger",
"handlebars",
"log",
"memchr",
@ -2709,7 +2685,7 @@ dependencies = [
"camino",
"clap",
"derive_builder",
"env_logger 0.10.2",
"env_logger",
"fs_extra",
"glob",
"humansize",
@ -2788,9 +2764,9 @@ dependencies = [
[[package]]
name = "papergrid"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2ccbe15f2b6db62f9a9871642746427e297b0ceb85f9a7f1ee5ff47d184d0c8"
checksum = "9ad43c07024ef767f9160710b3a6773976194758c7919b17e63b863db0bdf7fb"
dependencies = [
"bytecount",
"fnv",
@ -3326,7 +3302,7 @@ name = "rustbook"
version = "0.1.0"
dependencies = [
"clap",
"env_logger 0.10.2",
"env_logger",
"mdbook",
]
@ -5270,16 +5246,16 @@ dependencies = [
[[package]]
name = "sysinfo"
version = "0.29.11"
version = "0.30.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666"
checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2"
dependencies = [
"cfg-if",
"core-foundation-sys",
"libc",
"ntapi",
"once_cell",
"winapi",
"windows",
]
[[package]]
@ -5314,9 +5290,9 @@ dependencies = [
[[package]]
name = "tabled"
version = "0.13.0"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d38d39c754ae037a9bc3ca1580a985db7371cd14f1229172d1db9093feb6739"
checksum = "4c998b0c8b921495196a48aabaf1901ff28be0760136e31604f7967b0792050e"
dependencies = [
"papergrid",
"unicode-width",

View File

@ -5,12 +5,12 @@ edition = "2021"
[dependencies]
build_helper = { path = "../build_helper" }
env_logger = "0.10"
env_logger = "0.11"
log = "0.4"
anyhow = { version = "1", features = ["backtrace"] }
humantime = "2"
humansize = "2"
sysinfo = { version = "0.29", default-features = false }
sysinfo = { version = "0.30", default-features = false }
fs_extra = "1"
camino = "1"
reqwest = { version = "0.11", features = ["blocking"] }
@ -23,4 +23,4 @@ glob = "0.3"
tempfile = "3.5"
derive_builder = "0.20"
clap = { version = "4", features = ["derive"] }
tabled = { version = "0.13", default-features = false, features = ["std"] }
tabled = { version = "0.15", default-features = false, features = ["std"] }

View File

@ -2,7 +2,7 @@ use std::io::Write;
use tabled::builder::Builder;
use tabled::settings::object::Columns;
use tabled::settings::style::{BorderChar, Offset};
use tabled::settings::style::{LineChar, Offset};
use tabled::settings::{Modify, Style};
use crate::environment::Environment;
@ -40,11 +40,11 @@ pub fn print_binary_sizes(env: &Environment) -> anyhow::Result<()> {
// Write to GitHub summary
if let Ok(summary_path) = std::env::var("GITHUB_STEP_SUMMARY") {
let mut builder = Builder::default();
builder.push_record(vec!["Artifact", "Size"]);
for (name, size_formatted) in items {
builder.push_record(vec![name, size_formatted]);
}
builder.set_header(vec!["Artifact", "Size"]);
let mut table = builder.build();
let mut file = std::fs::File::options().append(true).create(true).open(summary_path)?;
@ -52,7 +52,7 @@ pub fn print_binary_sizes(env: &Environment) -> anyhow::Result<()> {
file,
"# Artifact size\n{}\n",
table.with(Style::markdown()).with(
Modify::new(Columns::single(1)).with(BorderChar::horizontal(':', Offset::End(0))),
Modify::new(Columns::single(1)).with(LineChar::horizontal(':', Offset::End(0))),
)
)?;
}

View File

@ -1,4 +1,4 @@
use sysinfo::{DiskExt, RefreshKind, System, SystemExt};
use sysinfo::Disks;
use crate::environment::Environment;
use crate::timer::Timer;
@ -15,9 +15,9 @@ pub fn format_env_variables() -> String {
}
pub fn print_free_disk_space() -> anyhow::Result<()> {
let sys = System::new_with_specifics(RefreshKind::default().with_disks_list().with_disks());
let available_space: u64 = sys.disks().iter().map(|d| d.available_space()).sum();
let total_space: u64 = sys.disks().iter().map(|d| d.total_space()).sum();
let disks = Disks::new_with_refreshed_list();
let available_space: u64 = disks.list().iter().map(|d| d.available_space()).sum();
let total_space: u64 = disks.list().iter().map(|d| d.total_space()).sum();
let used_space = total_space - available_space;
log::info!(

View File

@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
clap = "4.0.32"
env_logger = "0.10"
env_logger = "0.11"
[dependencies.mdbook]
version = "0.4.37"