From 3ca753f4b9c977d30bde0b5411ec2d44544b1469 Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:17:27 +0000 Subject: [PATCH] deps: bump root deps as of 2024-12-20 (#1648) * deps: bump root deps as of 2024-12-20 * remove deprecated code --- Cargo.lock | 68 +++++++++++++++++++------------------- Cargo.toml | 24 +++++++------- src/data_collection/amd.rs | 1 + src/utils/logging.rs | 21 +----------- 4 files changed, 48 insertions(+), 66 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7eeba58c..9e2b1cd8b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,9 +83,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" [[package]] name = "assert_cmd" @@ -245,9 +245,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.21" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" +checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" dependencies = [ "clap_builder", "clap_derive", @@ -255,9 +255,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.21" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" +checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" dependencies = [ "anstream", "anstyle", @@ -268,9 +268,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.38" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" +checksum = "ac2e663e3e3bed2d32d065a8404024dad306e699a04263ec59919529f803aee9" dependencies = [ "clap", ] @@ -309,9 +309,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "clap_mangen" @@ -546,12 +546,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -562,9 +562,9 @@ checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fern" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69ff9c9d5fb3e6da8ac2f77ab76fe7e8087d512ce095200f8f29ac5b656cf6dc" +checksum = "4316185f709b23713e41e3195f90edef7fb00c3ed4adc79769cf09cc762a3b29" dependencies = [ "log", ] @@ -582,9 +582,9 @@ dependencies = [ [[package]] name = "float-cmp" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" dependencies = [ "num-traits", ] @@ -655,9 +655,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown", @@ -727,9 +727,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.162" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" @@ -1014,9 +1014,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "predicates" -version = "3.1.2" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "difflib", @@ -1183,15 +1183,15 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.40" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1247,18 +1247,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", @@ -1543,9 +1543,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -1566,9 +1566,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", diff --git a/Cargo.toml b/Cargo.toml index c3fc7690a..ab7e27705 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,10 +72,10 @@ logging = ["fern", "log", "time"] generate_schema = ["schemars", "serde_json", "strum"] [dependencies] -anyhow = "1.0.93" +anyhow = "1.0.94" backtrace = "0.3.74" cfg-if = "1.0.0" -clap = { version = "4.5.21", features = ["default", "cargo", "wrap_help", "derive"] } +clap = { version = "4.5.23", features = ["default", "cargo", "wrap_help", "derive"] } concat-string = "1.0.1" crossterm = "0.28.1" ctrlc = { version = "3.4.5", features = ["termination"] } @@ -83,12 +83,12 @@ dirs = "5.0.1" # Maybe consider https://github.com/rust-lang/rustc-hash for some cases too? hashbrown = "0.15.2" humantime = "2.1.0" -indexmap = "2.6.0" +indexmap = "2.7.0" indoc = "2.0.5" itertools = "0.13.0" nvml-wrapper = { version = "0.10.0", optional = true, features = ["legacy-functions"] } regex = "1.11.1" -serde = { version = "1.0.214", features = ["derive"] } +serde = { version = "1.0.216", features = ["derive"] } starship-battery = { version = "0.10.0", optional = true } sysinfo = "=0.30.13" toml_edit = { version = "0.22.22", features = ["serde"] } @@ -98,9 +98,9 @@ unicode-segmentation = "1.12.0" unicode-width = "0.2.0" # Used for logging. -fern = { version = "0.7.0", optional = true } +fern = { version = "0.7.1", optional = true } log = { version = "0.4.22", optional = true } -time = { version = "0.3.36", features = ["local-offset", "formatting", "macros"], optional = true } +time = { version = "0.3.37", features = ["local-offset", "formatting", "macros"], optional = true } # These are just used for JSON schema generation. schemars = { version = "0.8.21", optional = true } @@ -108,10 +108,10 @@ serde_json = { version = "1.0.133", optional = true } strum = { version = "0.26.3", features = ["derive"], optional = true } [target.'cfg(unix)'.dependencies] -libc = "0.2.162" +libc = "0.2.169" [target.'cfg(target_os = "linux")'.dependencies] -rustix = { version = "0.38.40", features = ["fs", "param"] } +rustix = { version = "0.38.42", features = ["fs", "param"] } [target.'cfg(target_os = "macos")'.dependencies] core-foundation = "0.10.0" @@ -129,22 +129,22 @@ windows = { version = "0.58.0", features = [ ] } [target.'cfg(target_os = "freebsd")'.dependencies] -serde_json = { version = "1.0.132" } +serde_json = { version = "1.0.133" } sysctl = { version = "0.6.0" } filedescriptor = "0.8.2" [dev-dependencies] assert_cmd = "2.0.16" cargo-husky = { version = "1.5.0", default-features = false, features = ["user-hooks"] } -predicates = "3.1.2" +predicates = "3.1.3" tempfile = "3.14.0" [target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dev-dependencies] portable-pty = "0.8.1" [build-dependencies] -clap = { version = "4.5.21", features = ["default", "cargo", "wrap_help", "derive"] } -clap_complete = "4.5.38" +clap = { version = "4.5.23", features = ["default", "cargo", "wrap_help", "derive"] } +clap_complete = "4.5.40" clap_complete_nushell = "4.5.4" clap_complete_fig = "4.5.2" clap_mangen = "0.2.24" diff --git a/src/data_collection/amd.rs b/src/data_collection/amd.rs index fc0a8291b..1e3fa4275 100644 --- a/src/data_collection/amd.rs +++ b/src/data_collection/amd.rs @@ -437,6 +437,7 @@ pub fn get_amd_vecs( total_mem += mem.total } + // TODO: Not sure if this overlaps with the existing generic temperature code. if widgets_to_harvest.use_temp && Filter::optional_should_keep(filter, &device_name) { if let Some(temperatures) = get_amd_temp(&device_path) { for info in temperatures { diff --git a/src/utils/logging.rs b/src/utils/logging.rs index 85230ccb6..cb610984d 100644 --- a/src/utils/logging.rs +++ b/src/utils/logging.rs @@ -11,26 +11,7 @@ pub fn init_logger( let dispatch = fern::Dispatch::new() .format(|out, message, record| { let offset = OFFSET.get_or_init(|| { - use time::util::local_offset::Soundness; - - // SAFETY: We only invoke this once, quickly, and it should be invoked in a - // single-thread context. We also should only ever hit this - // logging at all in a debug context which is generally fine, - // release builds should have this logging disabled entirely for now. - unsafe { - // XXX: If we ever DO add general logging as a release feature, evaluate this - // again and whether this is something we want enabled in - // release builds! What might be safe is falling back to the non-set-soundness - // mode when specifically using certain feature flags (e.g. dev-logging feature - // enables this behaviour). - - time::util::local_offset::set_soundness(Soundness::Unsound); - let res = - time::UtcOffset::current_local_offset().unwrap_or(time::UtcOffset::UTC); - time::util::local_offset::set_soundness(Soundness::Sound); - - res - } + time::UtcOffset::current_local_offset().unwrap_or(time::UtcOffset::UTC) }); let offset_time = {