From b9246d55910c4ed1c4d85b5e270ffa35f73d76be Mon Sep 17 00:00:00 2001 From: AlexTMjugador Date: Mon, 20 Jun 2022 18:43:43 +0200 Subject: [PATCH] chore: update dependencies and apply recent once_cell feature renamings https://github.com/rust-lang/rust/pull/98165 landed in the latest Rust nightly version, which made Dependabot CI runs to fail. Try to get builds working again by updating the references to the old names accordingly. While at it, let's also do some minor dependency version bumps. --- Cargo.lock | 32 +++++++++---------- packages/packsquash/Cargo.toml | 4 +-- .../src/pack_file/json_file/debloater.rs | 2 +- .../src/pack_file/legacy_lang_file.rs | 4 +-- packages/packsquash/src/squash_zip.rs | 6 ++-- .../packsquash/src/squash_zip/system_id.rs | 4 +-- packages/packsquash_cli/Cargo.toml | 2 +- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7384820c3..784230bf9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -66,9 +66,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" [[package]] name = "array-init" @@ -1799,18 +1799,18 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro2" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ "proc-macro2", ] @@ -1936,9 +1936,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74fdc210d8f24a7dbfedc13b04ba5764f5232754ccebfdf5fff1bad791ccbc6" +checksum = "c3b221de559e4a29df3b957eec92bc0de6bc8eaf6ca9cfed43e5e1d67ff65a34" dependencies = [ "bytemuck", ] @@ -1960,9 +1960,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "a0a5f7c728f5d284929a1cccb5bc19884422bfe6ef4d6c409da2c41838983fcf" [[package]] name = "ryu" @@ -2084,9 +2084,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.96" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", @@ -2095,9 +2095,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.24.4" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c481baae55ea597122229896b67df9af4b941678bf2eab6228139331e66fb0" +checksum = "7d80929a3b477bce3a64360ca82bfb361eacce1dcb7b1fb31e8e5e181e37c212" dependencies = [ "cfg-if", "core-foundation-sys", @@ -2190,9 +2190,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "82501a4c1c0330d640a6e176a3d6a204f5ec5237aca029029d21864a902e27b0" dependencies = [ "itoa", "libc", diff --git a/packages/packsquash/Cargo.toml b/packages/packsquash/Cargo.toml index 7880d8ea3..678a4ea88 100644 --- a/packages/packsquash/Cargo.toml +++ b/packages/packsquash/Cargo.toml @@ -18,7 +18,7 @@ thiserror = "1.0.31" ahash = "0.7.6" num_cpus = "1.13.1" -sysinfo = { version = "0.24.4", default-features = false } +sysinfo = { version = "0.24.5", default-features = false } walkdir = "2.3.2" tokio = { version = "1.19.2", default-features = false, features = ["rt-multi-thread", "macros", "io-util", "fs", "sync", "parking_lot"] } @@ -34,7 +34,7 @@ jsonpath_lib = "0.3.0" spng = { version = "0.2.0-alpha.2", default-features = false } png = "0.17.5" -rgb = "0.8.32" +rgb = "0.8.33" imagequant = { version = "4.0.0", default-features = false } oxipng = { version = "5.0.1", default-features = false, features = ["zopfli"] } diff --git a/packages/packsquash/src/pack_file/json_file/debloater.rs b/packages/packsquash/src/pack_file/json_file/debloater.rs index f35475c5c..7cbf9538e 100644 --- a/packages/packsquash/src/pack_file/json_file/debloater.rs +++ b/packages/packsquash/src/pack_file/json_file/debloater.rs @@ -1,6 +1,6 @@ //! Implements a debloater (i.e. unused key or value remover) for JSON files. -use std::{cell::Cell, lazy::OnceCell}; +use std::cell::{Cell, OnceCell}; use jsonpath_lib::SelectorMut; use serde_json::Value; diff --git a/packages/packsquash/src/pack_file/legacy_lang_file.rs b/packages/packsquash/src/pack_file/legacy_lang_file.rs index 3a732e4ad..b19edaaeb 100644 --- a/packages/packsquash/src/pack_file/legacy_lang_file.rs +++ b/packages/packsquash/src/pack_file/legacy_lang_file.rs @@ -1,4 +1,4 @@ -use std::lazy::SyncLazy; +use std::sync::LazyLock; use ahash::AHashSet; use futures::{future, StreamExt}; @@ -19,7 +19,7 @@ use super::{OptimizedBytesChunk, PackFile, PackFileConstructor}; mod tests; /// A regular expression that matches plausible Java format specifiers, used in format strings. -static FORMAT_SPECIFIER_REGEX: SyncLazy = SyncLazy::new(|| { +static FORMAT_SPECIFIER_REGEX: LazyLock = LazyLock::new(|| { // The format specifier follows this syntax // (from https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Formatter.html#summary): // %[argument_index$][flags][width][.precision]conversion diff --git a/packages/packsquash/src/squash_zip.rs b/packages/packsquash/src/squash_zip.rs index 980cfbbaa..bd9212d2f 100644 --- a/packages/packsquash/src/squash_zip.rs +++ b/packages/packsquash/src/squash_zip.rs @@ -4,10 +4,10 @@ use std::{ borrow::Cow, collections::hash_map::Entry, io::{self, ErrorKind, Read, SeekFrom}, - lazy::SyncLazy, num::TryFromIntError, path::Path, string::FromUtf8Error, + sync::LazyLock, time::SystemTime }; @@ -191,8 +191,8 @@ struct MutableSquashZipState { /// The system time sanitizer that SquashZip will use for sanitizing and /// desanitizing dates to and from ZIP files, respectively. -static SYSTEM_TIME_SANITIZER: SyncLazy> = - SyncLazy::new(SystemTimeSanitizer::new); +static SYSTEM_TIME_SANITIZER: LazyLock> = + LazyLock::new(SystemTimeSanitizer::new); impl SquashZip { /// Creates a new instance of this struct, that may leverage the diff --git a/packages/packsquash/src/squash_zip/system_id.rs b/packages/packsquash/src/squash_zip/system_id.rs index 12c8fd7f9..810cd64ee 100644 --- a/packages/packsquash/src/squash_zip/system_id.rs +++ b/packages/packsquash/src/squash_zip/system_id.rs @@ -15,7 +15,7 @@ // https://docs.rs/crate/machine-uid/0.2.0 // https://github.com/tilda/rust-hwid -use std::{cmp::Ordering, env, lazy::SyncOnceCell}; +use std::{cmp::Ordering, env, sync::OnceLock}; use tokio::task; use uuid::Uuid; @@ -104,7 +104,7 @@ impl Eq for SystemId {} /// The cell that will be used to memoize the result of computing the system ID, so /// it's done only once in the lifetime of the process. -static SYSTEM_ID: SyncOnceCell = SyncOnceCell::new(); +static SYSTEM_ID: OnceLock = OnceLock::new(); /// Returns the system ID, calculating it if that was not done yet. /// diff --git a/packages/packsquash_cli/Cargo.toml b/packages/packsquash_cli/Cargo.toml index 1a31e192d..a41441f73 100644 --- a/packages/packsquash_cli/Cargo.toml +++ b/packages/packsquash_cli/Cargo.toml @@ -30,7 +30,7 @@ winapi-util = "0.1.5" [build-dependencies] vergen = { version = "7.2.1", default-features = false, features = ["cargo", "git"] } -time = { version = "0.3.9", default-features = false, features = ["std"] } +time = { version = "0.3.10", default-features = false, features = ["std"] } [target.'cfg(windows)'.build-dependencies] winres = "0.1.12"