Update Rust deps (#2332)

* Temporarily disable hakari

* Upgrade compatible deps except Chrono

* Update semver-incompatible crates

* Re-enable hakari

* Update licenses & cargo-deny

* Fix new clippy lints

* Update to latest Rust
This commit is contained in:
Damien Elmes 2023-01-18 22:24:29 +10:00 committed by GitHub
parent ded805b504
commit 943dddf28f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 346 additions and 450 deletions

View File

@ -11,8 +11,7 @@ unmaintained = "warn"
yanked = "warn"
notice = "warn"
ignore = [
# xml-rs via apple-bundles: not used for untrusted input
"RUSTSEC-2022-0048",
]
[licenses]

439
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -9,15 +9,15 @@ license.workspace = true
rust-version.workspace = true
[dependencies]
camino = "1.1.1"
camino = "1.1.2"
flate2 = "1.0.25"
sha2 = { version = "0.10.6" }
tar = "0.4.38"
tokio = { version = "1.23.1", features = ["macros", "rt-multi-thread"] }
tokio = { version = "1.24.2", features = ["macros", "rt-multi-thread"] }
workspace-hack = { version = "0.1", path = "../../tools/workspace-hack" }
xz2 = "0.1.7"
zip = "0.6.3"
zstd = "0.12.0"
zstd = "0.12.2"
[features]
rustls = ["reqwest/rustls-tls", "reqwest/rustls-tls-native-roots"]

View File

@ -9,12 +9,12 @@ license.workspace = true
rust-version.workspace = true
[dependencies]
camino = "1.1.1"
globset = "0.4.9"
camino = "1.1.2"
globset = "0.4.10"
itertools = "0.10.5"
lazy_static = "1.4.0"
maplit = "1.0.2"
num_cpus = "1.14.0"
num_cpus = "1.15.0"
walkdir = "2.3.2"
which = "4.3.0"
workspace-hack = { version = "0.1", path = "../../tools/workspace-hack" }

View File

@ -9,8 +9,8 @@ license.workspace = true
rust-version.workspace = true
[dependencies]
camino = "1.1.1"
clap = { version = "4.0.29", features = ["derive"] }
camino = "1.1.2"
clap = { version = "4.1.1", features = ["derive"] }
junction = "0.2.0"
termcolor = "1.1.3"
termcolor = "1.2.0"
workspace-hack = { version = "0.1", path = "../../tools/workspace-hack" }

View File

@ -1,7 +1,7 @@
[
{
"name": "addr2line",
"version": "0.17.0",
"version": "0.19.0",
"authors": null,
"repository": "https://github.com/gimli-rs/addr2line",
"license": "Apache-2.0 OR MIT",
@ -82,7 +82,7 @@
},
{
"name": "anyhow",
"version": "1.0.66",
"version": "1.0.68",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/anyhow",
"license": "Apache-2.0 OR MIT",
@ -163,7 +163,7 @@
},
{
"name": "async-trait",
"version": "0.1.60",
"version": "0.1.61",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/async-trait",
"license": "Apache-2.0 OR MIT",
@ -181,7 +181,7 @@
},
{
"name": "axum",
"version": "0.6.1",
"version": "0.6.2",
"authors": null,
"repository": "https://github.com/tokio-rs/axum",
"license": "MIT",
@ -199,7 +199,7 @@
},
{
"name": "axum-core",
"version": "0.3.0",
"version": "0.3.1",
"authors": null,
"repository": "https://github.com/tokio-rs/axum",
"license": "MIT",
@ -208,7 +208,7 @@
},
{
"name": "axum-macros",
"version": "0.3.0",
"version": "0.3.1",
"authors": null,
"repository": "https://github.com/tokio-rs/axum",
"license": "MIT",
@ -217,7 +217,7 @@
},
{
"name": "backtrace",
"version": "0.3.66",
"version": "0.3.67",
"authors": "The Rust Project Developers",
"repository": "https://github.com/rust-lang/backtrace-rs",
"license": "Apache-2.0 OR MIT",
@ -289,7 +289,7 @@
},
{
"name": "bumpalo",
"version": "3.11.1",
"version": "3.12.0",
"authors": "Nick Fitzgerald <fitzgen@gmail.com>",
"repository": "https://github.com/fitzgen/bumpalo",
"license": "Apache-2.0 OR MIT",
@ -316,7 +316,7 @@
},
{
"name": "bzip2",
"version": "0.4.3",
"version": "0.4.4",
"authors": "Alex Crichton <alex@alexcrichton.com>",
"repository": "https://github.com/alexcrichton/bzip2-rs",
"license": "Apache-2.0 OR MIT",
@ -334,7 +334,7 @@
},
{
"name": "cc",
"version": "1.0.77",
"version": "1.0.78",
"authors": "Alex Crichton <alex@alexcrichton.com>",
"repository": "https://github.com/rust-lang/cc-rs",
"license": "Apache-2.0 OR MIT",
@ -388,7 +388,7 @@
},
{
"name": "concurrent-queue",
"version": "2.0.0",
"version": "2.1.0",
"authors": "Stjepan Glavina <stjepang@gmail.com>|Taiki Endo <te316e89@gmail.com>|John Nunley <jtnunley01@gmail.com>",
"repository": "https://github.com/smol-rs/concurrent-queue",
"license": "Apache-2.0 OR MIT",
@ -505,7 +505,7 @@
},
{
"name": "cxx",
"version": "1.0.83",
"version": "1.0.86",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/cxx",
"license": "Apache-2.0 OR MIT",
@ -514,7 +514,7 @@
},
{
"name": "cxx-build",
"version": "1.0.83",
"version": "1.0.86",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/cxx",
"license": "Apache-2.0 OR MIT",
@ -523,7 +523,7 @@
},
{
"name": "cxxbridge-flags",
"version": "1.0.83",
"version": "1.0.86",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/cxx",
"license": "Apache-2.0 OR MIT",
@ -532,7 +532,7 @@
},
{
"name": "cxxbridge-macro",
"version": "1.0.83",
"version": "1.0.86",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/cxx",
"license": "Apache-2.0 OR MIT",
@ -557,6 +557,15 @@
"license_file": null,
"description": "Dead simple async pool utitities for sync managers"
},
{
"name": "difflib",
"version": "0.4.0",
"authors": "Dima Kudosh <dimakudosh@gmail.com>",
"repository": "https://github.com/DimaKudosh/difflib",
"license": "MIT",
"license_file": null,
"description": "Port of Python's difflib library to Rust."
},
{
"name": "digest",
"version": "0.10.6",
@ -575,15 +584,6 @@
"license_file": null,
"description": "A derive macro for implementing the display Trait via a doc comment and string interpolation"
},
{
"name": "dissimilar",
"version": "1.0.4",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/dissimilar",
"license": "Apache-2.0",
"license_file": null,
"description": "Diff library with semantic cleanup, based on Google's diff-match-patch"
},
{
"name": "doc-comment",
"version": "0.3.3",
@ -919,7 +919,7 @@
},
{
"name": "gimli",
"version": "0.26.2",
"version": "0.27.0",
"authors": null,
"repository": "https://github.com/gimli-rs/gimli",
"license": "Apache-2.0 OR MIT",
@ -1207,7 +1207,7 @@
},
{
"name": "io-lifetimes",
"version": "1.0.3",
"version": "1.0.4",
"authors": "Dan Gohman <dev@sunfishcode.online>",
"repository": "https://github.com/sunfishcode/io-lifetimes",
"license": "Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT",
@ -1216,7 +1216,7 @@
},
{
"name": "ipnet",
"version": "2.6.0",
"version": "2.7.1",
"authors": "Kris Price <kris@krisprice.nz>",
"repository": "https://github.com/krisprice/ipnet",
"license": "Apache-2.0 OR MIT",
@ -1225,7 +1225,7 @@
},
{
"name": "is-terminal",
"version": "0.4.1",
"version": "0.4.2",
"authors": "softprops <d.tangren@gmail.com>|Dan Gohman <dev@sunfishcode.online>",
"repository": "https://github.com/sunfishcode/is-terminal",
"license": "MIT",
@ -1297,7 +1297,7 @@
},
{
"name": "link-cplusplus",
"version": "1.0.7",
"version": "1.0.8",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/link-cplusplus",
"license": "Apache-2.0 OR MIT",
@ -1306,7 +1306,7 @@
},
{
"name": "linux-raw-sys",
"version": "0.1.3",
"version": "0.1.4",
"authors": "Dan Gohman <dev@sunfishcode.online>",
"repository": "https://github.com/sunfishcode/linux-raw-sys",
"license": "Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT",
@ -1421,15 +1421,6 @@
"license_file": null,
"description": "Fast float parsing conversion routines."
},
{
"name": "miniz_oxide",
"version": "0.5.4",
"authors": "Frommi <daniil.liferenko@gmail.com>|oyvindln <oyvindln@users.noreply.github.com>",
"repository": "https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide",
"license": "Apache-2.0 OR MIT OR Zlib",
"license_file": null,
"description": "DEFLATE compression and decompression library rewritten in Rust based on miniz"
},
{
"name": "miniz_oxide",
"version": "0.6.2",
@ -1486,7 +1477,7 @@
},
{
"name": "nom",
"version": "7.1.1",
"version": "7.1.3",
"authors": "contact@geoffroycouprie.com",
"repository": "https://github.com/Geal/nom",
"license": "MIT",
@ -1567,7 +1558,7 @@
},
{
"name": "object",
"version": "0.29.0",
"version": "0.30.2",
"authors": null,
"repository": "https://github.com/gimli-rs/object",
"license": "Apache-2.0 OR MIT",
@ -1657,7 +1648,7 @@
},
{
"name": "parking_lot_core",
"version": "0.9.5",
"version": "0.9.6",
"authors": "Amanieu d'Antras <amanieu@gmail.com>",
"repository": "https://github.com/Amanieu/parking_lot",
"license": "Apache-2.0 OR MIT",
@ -1837,7 +1828,7 @@
},
{
"name": "prettyplease",
"version": "0.1.21",
"version": "0.1.23",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/prettyplease",
"license": "Apache-2.0 OR MIT",
@ -1855,7 +1846,7 @@
},
{
"name": "proc-macro-hack",
"version": "0.5.19",
"version": "0.5.20+deprecated",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/proc-macro-hack",
"license": "Apache-2.0 OR MIT",
@ -1864,7 +1855,7 @@
},
{
"name": "proc-macro2",
"version": "1.0.49",
"version": "1.0.50",
"authors": "David Tolnay <dtolnay@gmail.com>|Alex Crichton <alex@alexcrichton.com>",
"repository": "https://github.com/dtolnay/proc-macro2",
"license": "Apache-2.0 OR MIT",
@ -1873,7 +1864,7 @@
},
{
"name": "prost",
"version": "0.11.3",
"version": "0.11.6",
"authors": "Dan Burkert <dan@danburkert.com>|Lucio Franco <luciofranco14@gmail.com|Tokio Contributors <team@tokio.rs>",
"repository": "https://github.com/tokio-rs/prost",
"license": "Apache-2.0",
@ -1882,7 +1873,7 @@
},
{
"name": "prost-build",
"version": "0.11.4",
"version": "0.11.6",
"authors": "Dan Burkert <dan@danburkert.com>|Lucio Franco <luciofranco14@gmail.com>|Tokio Contributors <team@tokio.rs>",
"repository": "https://github.com/tokio-rs/prost",
"license": "Apache-2.0",
@ -1891,7 +1882,7 @@
},
{
"name": "prost-derive",
"version": "0.11.2",
"version": "0.11.6",
"authors": "Dan Burkert <dan@danburkert.com>|Lucio Franco <luciofranco14@gmail.com>|Tokio Contributors <team@tokio.rs>",
"repository": "https://github.com/tokio-rs/prost",
"license": "Apache-2.0",
@ -1900,7 +1891,7 @@
},
{
"name": "prost-types",
"version": "0.11.2",
"version": "0.11.6",
"authors": "Dan Burkert <dan@danburkert.com>|Lucio Franco <luciofranco14@gmail.com|Tokio Contributors <team@tokio.rs>",
"repository": "https://github.com/tokio-rs/prost",
"license": "Apache-2.0",
@ -2008,7 +1999,7 @@
},
{
"name": "regex",
"version": "1.7.0",
"version": "1.7.1",
"authors": "The Rust Project Developers",
"repository": "https://github.com/rust-lang/regex",
"license": "Apache-2.0 OR MIT",
@ -2098,7 +2089,7 @@
},
{
"name": "rustix",
"version": "0.36.5",
"version": "0.36.6",
"authors": "Dan Gohman <dev@sunfishcode.online>|Jakub Konka <kubkon@jakubkonka.com>",
"repository": "https://github.com/bytecodealliance/rustix",
"license": "Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT",
@ -2152,7 +2143,7 @@
},
{
"name": "schannel",
"version": "0.1.20",
"version": "0.1.21",
"authors": "Steven Fackler <sfackler@gmail.com>|Steffen Butzer <steffen.butzer@outlook.com>",
"repository": "https://github.com/steffengy/schannel-rs",
"license": "MIT",
@ -2170,7 +2161,7 @@
},
{
"name": "scratch",
"version": "1.0.2",
"version": "1.0.3",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/scratch",
"license": "Apache-2.0 OR MIT",
@ -2269,7 +2260,7 @@
},
{
"name": "serde_repr",
"version": "0.1.9",
"version": "0.1.10",
"authors": "David Tolnay <dtolnay@gmail.com>",
"repository": "https://github.com/dtolnay/serde-repr",
"license": "Apache-2.0 OR MIT",
@ -2368,7 +2359,7 @@
},
{
"name": "snafu",
"version": "0.7.3",
"version": "0.7.4",
"authors": "Jake Goulding <jake.goulding@gmail.com>",
"repository": "https://github.com/shepmaster/snafu",
"license": "Apache-2.0 OR MIT",
@ -2377,7 +2368,7 @@
},
{
"name": "snafu-derive",
"version": "0.7.3",
"version": "0.7.4",
"authors": "Jake Goulding <jake.goulding@gmail.com>",
"repository": "https://github.com/shepmaster/snafu",
"license": "Apache-2.0 OR MIT",
@ -2503,7 +2494,7 @@
},
{
"name": "termcolor",
"version": "1.1.3",
"version": "1.2.0",
"authors": "Andrew Gallant <jamslam@gmail.com>",
"repository": "https://github.com/BurntSushi/termcolor",
"license": "MIT OR Unlicense",
@ -2593,7 +2584,7 @@
},
{
"name": "tokio",
"version": "1.24.1",
"version": "1.24.2",
"authors": "Tokio Contributors <team@tokio.rs>",
"repository": "https://github.com/tokio-rs/tokio",
"license": "MIT",
@ -2647,9 +2638,9 @@
},
{
"name": "toml",
"version": "0.5.9",
"version": "0.5.10",
"authors": "Alex Crichton <alex@alexcrichton.com>",
"repository": "https://github.com/alexcrichton/toml-rs",
"repository": "https://github.com/toml-rs/toml",
"license": "Apache-2.0 OR MIT",
"license_file": null,
"description": "A native Rust encoder and decoder of TOML-formatted files and streams. Provides implementations of the standard Serialize/Deserialize traits for TOML data to facilitate deserializing and serializing Rust structures."
@ -2746,7 +2737,7 @@
},
{
"name": "try-lock",
"version": "0.2.3",
"version": "0.2.4",
"authors": "Sean McArthur <sean@seanmonstar.com>",
"repository": "https://github.com/seanmonstar/try-lock",
"license": "MIT",
@ -3131,15 +3122,6 @@
"license_file": null,
"description": "Import libraries for the x86_64-pc-windows-gnu target. Please don't use this crate directly, depend on winapi instead."
},
{
"name": "windows-sys",
"version": "0.36.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
"license_file": null,
"description": "Rust for Windows"
},
{
"name": "windows-sys",
"version": "0.42.0",
@ -3151,7 +3133,7 @@
},
{
"name": "windows_aarch64_gnullvm",
"version": "0.42.0",
"version": "0.42.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
@ -3160,16 +3142,7 @@
},
{
"name": "windows_aarch64_msvc",
"version": "0.36.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
"license_file": null,
"description": "Code gen support for the windows crate"
},
{
"name": "windows_aarch64_msvc",
"version": "0.42.0",
"version": "0.42.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
@ -3178,16 +3151,7 @@
},
{
"name": "windows_i686_gnu",
"version": "0.36.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
"license_file": null,
"description": "Code gen support for the windows crate"
},
{
"name": "windows_i686_gnu",
"version": "0.42.0",
"version": "0.42.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
@ -3196,16 +3160,7 @@
},
{
"name": "windows_i686_msvc",
"version": "0.36.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
"license_file": null,
"description": "Code gen support for the windows crate"
},
{
"name": "windows_i686_msvc",
"version": "0.42.0",
"version": "0.42.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
@ -3214,16 +3169,7 @@
},
{
"name": "windows_x86_64_gnu",
"version": "0.36.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
"license_file": null,
"description": "Code gen support for the windows crate"
},
{
"name": "windows_x86_64_gnu",
"version": "0.42.0",
"version": "0.42.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
@ -3232,7 +3178,7 @@
},
{
"name": "windows_x86_64_gnullvm",
"version": "0.42.0",
"version": "0.42.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
@ -3241,16 +3187,7 @@
},
{
"name": "windows_x86_64_msvc",
"version": "0.36.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
"license_file": null,
"description": "Code gen support for the windows crate"
},
{
"name": "windows_x86_64_msvc",
"version": "0.42.0",
"version": "0.42.1",
"authors": "Microsoft",
"repository": "https://github.com/microsoft/windows-rs",
"license": "Apache-2.0 OR MIT",
@ -3304,7 +3241,7 @@
},
{
"name": "zstd",
"version": "0.12.1+zstd.1.5.2",
"version": "0.12.2+zstd.1.5.2",
"authors": "Alexandre Bury <alexandre.bury@gmail.com>",
"repository": "https://github.com/gyscos/zstd-rs",
"license": "MIT",
@ -3331,7 +3268,7 @@
},
{
"name": "zstd-sys",
"version": "2.0.4+zstd.1.5.2",
"version": "2.0.5+zstd.1.5.2",
"authors": "Alexandre Bury <alexandre.bury@gmail.com>",
"repository": "https://github.com/gyscos/zstd-rs",
"license": "Apache-2.0 OR MIT",

View File

@ -13,6 +13,6 @@ name = "ftl-sync"
path = "sync.rs"
[dependencies]
camino = "1.1.1"
snafu = { version = "0.7.3" }
camino = "1.1.2"
snafu = { version = "0.7.4" }
workspace-hack = { version = "0.1", path = "../tools/workspace-hack" }

View File

@ -15,7 +15,7 @@ workspace-hack = { version = "0.1", path = "../../tools/workspace-hack" }
# /cargo/update.py needs to be run if updating the version below
[dependencies.pyo3]
version = "0.17.3"
version = "0.18.0"
features = ["extension-module", "abi3", "abi3-py39"]
[lib]

View File

@ -9,15 +9,15 @@ license.workspace = true
rust-version.workspace = true
[dependencies]
anyhow = "1.0.66"
apple-bundles = "0.15.0"
camino = "1.1.1"
clap = { version = "4.0.29", features = ["derive"] }
glob = "0.3.0"
anyhow = "1.0.68"
apple-bundles = "0.17.0"
camino = "1.1.2"
clap = { version = "4.1.1", features = ["derive"] }
glob = "0.3.1"
lazy_static = "1.4.0"
plist = "1.3.1"
serde = { version = "1.0.148", features = ["derive"] }
serde_json = "1.0.89"
plist = "1.4.0"
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.91"
simple-file-manifest = "0.11.0"
walkdir = "2.3.2"
workspace-hack = { version = "0.1", path = "../../../tools/workspace-hack" }

View File

@ -63,7 +63,7 @@ pub fn notarize_app(output_folder: &Utf8Path) -> Result<()> {
),
};
let uuid_path = output_folder.with_extension("uuid");
fs::write(&uuid_path, output.id).expect("write uuid");
fs::write(uuid_path, output.id).expect("write uuid");
Ok(())
}

View File

@ -9,10 +9,10 @@ license.workspace = true
rust-version.workspace = true
[dependencies]
anyhow = "1.0.66"
camino = "1.1.1"
clap = { version = "4.0.29", features = ["derive"] }
glob = "0.3.0"
tugger-windows-codesign = "0.9.0"
anyhow = "1.0.68"
camino = "1.1.2"
clap = { version = "4.1.1", features = ["derive"] }
glob = "0.3.1"
tugger-windows-codesign = "0.10.0"
walkdir = "2.3.2"
workspace-hack = { version = "0.1", path = "../../../tools/workspace-hack" }

View File

@ -27,7 +27,7 @@ required-features = ["bench"]
# After updating anything below, run ../cargo/update.py
[build-dependencies]
prost-build = "0.11.4"
prost-build = "0.11.6"
which = "4.3.0"
[dev-dependencies]
@ -49,16 +49,18 @@ csv = { git = "https://github.com/ankitects/rust-csv.git", rev = "1c9d3aab6f79a7
# pinned as any changes could invalidate sqlite indexes
unicase = "=2.6.0"
# keep this at 0.4.19 until an Android-compatible update is ready
chrono = { version = "0.4.19", default-features = false, features = ["std", "clock"] }
criterion = { version = "0.4.0", optional = true }
ammonia = "3.3.0"
async-compression = { version = "0.3.15", features = ["zstd", "tokio"] }
async-trait = "0.1.59"
axum = { version = "0.6.1", features = ["multipart", "macros", "headers"] }
async-trait = "0.1.61"
axum = { version = "0.6.2", features = ["multipart", "macros", "headers"] }
axum-client-ip = "0.3.1"
blake3 = "1.3.3"
bytes = "1.3.0"
chrono = { version = "0.4.19", default-features = false, features = ["std", "clock"] }
coarsetime = "0.1.22"
convert_case = "0.6.0"
difflib = "0.4.0"
@ -73,29 +75,29 @@ hyper = "0.14.23"
id_tree = "1.8.0"
itertools = "0.10.5"
lazy_static = "1.4.0"
nom = "7.1.1"
nom = "7.1.3"
num-integer = "0.1.45"
num_cpus = "1.14.0"
num_cpus = "1.15.0"
num_enum = "0.5.7"
once_cell = "1.16.0"
once_cell = "1.17.0"
pin-project = "1.0.12"
prost = "0.11.3"
prost = "0.11.6"
pulldown-cmark = "0.9.2"
rand = "0.8.5"
regex = "1.7.0"
regex = "1.7.1"
rusqlite = { version = "0.28.0", features = ["trace", "functions", "collation", "bundled"] }
scopeguard = "1.1.0"
serde = "1.0.148"
serde = "1.0.152"
serde-aux = "4.1.2"
serde_derive = "1.0.148"
serde_json = "1.0.89"
serde_repr = "0.1.9"
serde_derive = "1.0.152"
serde_json = "1.0.91"
serde_repr = "0.1.10"
serde_tuple = "0.5.0"
sha1 = "0.10.5"
snafu = { version = "0.7.3", features = ["backtraces"] }
snafu = { version = "0.7.4", features = ["backtraces"] }
strum = { version = "0.24.1", features = ["derive"] }
tempfile = "3.3.0"
tokio = { version = "1.23", features = ["fs", "rt-multi-thread", "macros"] }
tokio = { version = "1.24", features = ["fs", "rt-multi-thread", "macros"] }
tokio-util = { version = "0.7.4", features = ["io"] }
tower-http = { version = "0.3.5", features = ["trace"] }
tracing = { version = "0.1.37", features = ["max_level_trace", "release_max_level_debug"] }
@ -106,4 +108,4 @@ unicode-normalization = "0.1.22"
utime = "0.3.1"
workspace-hack = { version = "0.1", path = "../tools/workspace-hack" }
zip = { version = "0.6.3", default-features = false, features = ["deflate", "time"] }
zstd = { version = "0.12.0", features = ["zstdmt"] }
zstd = { version = "0.12.2", features = ["zstdmt"] }

View File

@ -18,17 +18,17 @@ path = "src/lib.rs"
fluent-syntax = "0.11.0"
fluent = "0.16.0"
unic-langid = { version = "0.9.1", features = ["macros"] }
serde = { version = "1.0.148", features = ["derive"] }
serde_json = "1.0.89"
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.91"
inflections = "1.1.1"
[dependencies]
fluent = "0.16.0"
fluent-bundle = "0.15.2"
intl-memoizer = "0.5.1"
num-format = "0.4.3"
num-format = "0.4.4"
phf = { version = "0.11.1", features = ["macros"] }
serde = { version = "1.0.148", features = ["derive"] }
serde_json = "1.0.89"
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.91"
unic-langid = { version = "0.9.1", features = ["macros"] }
workspace-hack = { version = "0.1", path = "../../tools/workspace-hack" }

View File

@ -50,7 +50,7 @@ fn add_folder(map: &mut TranslationsByLang, folder: &Path, lang: &str) {
continue;
}
let module = fname.trim_end_matches(".ftl").replace('-', "_");
let text = fs::read_to_string(&entry.path()).unwrap();
let text = fs::read_to_string(entry.path()).unwrap();
assert!(
text.ends_with('\n'),
"file was missing final newline: {:?}",

View File

@ -29,7 +29,7 @@ pub fn write_strings(map: &TranslationsByLang, modules: &[Module]) {
let dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
let path = dir.join("strings.rs");
fs::write(&path, buf).unwrap();
fs::write(path, buf).unwrap();
}
fn write_methods(modules: &[Module], buf: &mut String) {

View File

@ -18,7 +18,7 @@ path = "src/lib.rs"
[dependencies]
fluent-syntax = "0.11.0"
lazy_static = "1.4.0"
regex = "1.7.0"
serde_json = "1.0.89"
regex = "1.7.1"
serde_json = "1.0.91"
walkdir = "2"
workspace-hack = { version = "0.1", path = "../../tools/workspace-hack" }

View File

@ -20,7 +20,7 @@ linkcheck = { git = "https://github.com/ankitects/linkcheck.git", rev = "2f20798
futures = "0.3.25"
itertools = "0.10.5"
strum = { version = "0.24.1", features = ["derive"] }
tokio = { version = "1.23.1", features = ["full"] }
tokio = { version = "1.24.2", features = ["full"] }
workspace-hack = { version = "0.1", path = "../../tools/workspace-hack" }
[features]

View File

@ -93,8 +93,8 @@ fn backup_inner<P: AsRef<Path>>(
fn write_backup<S: AsRef<OsStr>>(col_data: &[u8], backup_folder: S, tr: &I18n) -> Result<()> {
let out_path =
Path::new(&backup_folder).join(&format!("{}", Local::now().format(BACKUP_FORMAT_STRING)));
export_colpkg_from_data(&out_path, col_data, tr)
Path::new(&backup_folder).join(format!("{}", Local::now().format(BACKUP_FORMAT_STRING)));
export_colpkg_from_data(out_path, col_data, tr)
}
fn thin_backups<P: AsRef<Path>>(backup_folder: P, limits: BackupLimits) -> Result<()> {

View File

@ -371,7 +371,7 @@ impl From<Deck> for DeckSchema11 {
} else {
Some(filt.delays.clone())
},
preview_delay: filt.preview_delay as u32,
preview_delay: filt.preview_delay,
common: deck.into(),
}),
}

View File

@ -70,7 +70,7 @@ fn maybe_rotate_log(path: &str) -> io::Result<()> {
let path3 = format!("{}.2", path);
// if a rotated file already exists, rename it
if let Err(e) = fs::rename(&path2, &path3) {
if let Err(e) = fs::rename(&path2, path3) {
if e.kind() != io::ErrorKind::NotFound {
return Err(e);
}

View File

@ -321,7 +321,7 @@ where
// if the original filename doesn't exist, we can just rename
if let Err(e) = fs::metadata(&orig_path) {
if e.kind() == io::ErrorKind::NotFound {
fs::rename(&dentry.path(), &orig_path)?;
fs::rename(dentry.path(), &orig_path)?;
} else {
return Err(e.into());
}
@ -544,12 +544,12 @@ pub(crate) mod test {
let (_dir, mgr, mut col) = common_setup()?;
// add some test files
write_file(&mgr.media_folder.join("zerobytes"), "")?;
create_dir(&mgr.media_folder.join("folder"))?;
write_file(&mgr.media_folder.join("normal.jpg"), "normal")?;
write_file(&mgr.media_folder.join("foo[.jpg"), "foo")?;
write_file(&mgr.media_folder.join("_under.jpg"), "foo")?;
write_file(&mgr.media_folder.join("unused.jpg"), "foo")?;
write_file(mgr.media_folder.join("zerobytes"), "")?;
create_dir(mgr.media_folder.join("folder"))?;
write_file(mgr.media_folder.join("normal.jpg"), "normal")?;
write_file(mgr.media_folder.join("foo[.jpg"), "foo")?;
write_file(mgr.media_folder.join("_under.jpg"), "foo")?;
write_file(mgr.media_folder.join("unused.jpg"), "foo")?;
let progress = |_n| true;
@ -575,8 +575,8 @@ pub(crate) mod test {
}
);
assert!(fs::metadata(&mgr.media_folder.join("foo[.jpg")).is_err());
assert!(fs::metadata(&mgr.media_folder.join("foo.jpg")).is_ok());
assert!(fs::metadata(mgr.media_folder.join("foo[.jpg")).is_err());
assert!(fs::metadata(mgr.media_folder.join("foo.jpg")).is_ok());
assert_eq!(
report,
@ -668,7 +668,7 @@ Unused: unused.jpg
fn unicode_normalization() -> Result<()> {
let (_dir, mgr, mut col) = common_setup()?;
write_file(&mgr.media_folder.join("ぱぱ.jpg"), "nfd encoding")?;
write_file(mgr.media_folder.join("ぱぱ.jpg"), "nfd encoding")?;
let progress = |_n| true;
@ -694,7 +694,7 @@ Unused: unused.jpg
trash_bytes: 0
}
);
assert!(fs::metadata(&mgr.media_folder.join("ぱぱ.jpg")).is_ok());
assert!(fs::metadata(mgr.media_folder.join("ぱぱ.jpg")).is_ok());
} else {
// on other platforms, the file should have been renamed to NFC
assert_eq!(
@ -711,8 +711,8 @@ Unused: unused.jpg
trash_bytes: 0
}
);
assert!(fs::metadata(&mgr.media_folder.join("ぱぱ.jpg")).is_err());
assert!(fs::metadata(&mgr.media_folder.join("ぱぱ.jpg")).is_ok());
assert!(fs::metadata(mgr.media_folder.join("ぱぱ.jpg")).is_err());
assert!(fs::metadata(mgr.media_folder.join("ぱぱ.jpg")).is_ok());
}
Ok(())

View File

@ -421,7 +421,7 @@ pub(crate) fn add_file_from_ankiweb(
}
pub(crate) fn data_for_file(media_folder: &Path, fname: &str) -> Result<Option<Vec<u8>>> {
let mut file = match open_file(&media_folder.join(fname)) {
let mut file = match open_file(media_folder.join(fname)) {
Err(e) if e.is_not_found() => return Ok(None),
res => res?,
};

View File

@ -360,8 +360,7 @@ impl Notetype {
// provided ordinal not on any existing field; cap to bounds
self.config
.sort_field_idx
.max(0)
.min((self.fields.len() - 1) as u32)
.clamp(0, (self.fields.len() - 1) as u32)
});
}

View File

@ -37,7 +37,7 @@ impl<'a> StateContext<'a> {
let (lower, upper) = constrained_fuzz_bounds(interval, minimum, maximum);
(lower as f32 + fuzz_factor * ((1 + upper - lower) as f32)).floor() as u32
} else {
(interval.round() as u32).max(minimum).min(maximum)
(interval.round() as u32).clamp(minimum, maximum)
}
}
@ -60,8 +60,8 @@ fn constrained_fuzz_bounds(interval: f32, minimum: u32, maximum: u32) -> (u32, u
// minimum <= maximum and lower <= upper are assumed
// now ensure minimum <= lower <= upper <= maximum
lower = lower.max(minimum).min(maximum);
upper = upper.max(minimum).min(maximum);
lower = lower.clamp(minimum, maximum);
upper = upper.clamp(minimum, maximum);
if upper == lower && upper > 2 && upper < maximum {
upper = lower + 1;

View File

@ -113,7 +113,7 @@ impl<'a> StateContext<'a> {
/// - `minimum` is as passed, but at least 1, and at most `maximum`.
pub(crate) fn min_and_max_review_intervals(&self, minimum: u32) -> (u32, u32) {
let maximum = self.maximum_review_interval.max(1);
let minimum = minimum.max(1).min(maximum);
let minimum = minimum.clamp(1, maximum);
(minimum, maximum)
}

View File

@ -221,7 +221,7 @@ fn constrain_passing_interval(ctx: &StateContext, interval: f32, minimum: u32, f
if fuzz {
ctx.with_review_fuzz(interval, minimum, maximum)
} else {
(interval.round() as u32).max(minimum).min(maximum)
(interval.round() as u32).clamp(minimum, maximum)
}
}

View File

@ -82,7 +82,7 @@ fn days_elapsed(
/// Build a FixedOffset struct, capping minutes_west if out of bounds.
pub(crate) fn fixed_offset_from_minutes(minutes_west: i32) -> FixedOffset {
let bounded_minutes = minutes_west.max(-23 * 60).min(23 * 60);
let bounded_minutes = minutes_west.clamp(-23 * 60, 23 * 60);
FixedOffset::west_opt(bounded_minutes * 60).unwrap()
}

View File

@ -63,7 +63,7 @@ impl FromI64 for i64 {
impl FromI64 for TimestampSecs {
fn from_i64(val: i64) -> Self {
TimestampSecs(val as i64)
TimestampSecs(val)
}
}

View File

@ -171,7 +171,7 @@ where
}
// any remaining entries from the database have been deleted
let removed: Vec<_> = mtimes.into_iter().map(|(k, _)| k).collect();
let removed: Vec<_> = mtimes.into_keys().collect();
for f in &removed {
debug!(fname = f, "db entry missing on disk");
}

View File

@ -49,7 +49,7 @@ impl SyncVersion {
pub fn ensure_supported(&self) -> HttpResult<()> {
if self.is_too_old() || self.is_too_new() {
None.or_bad_request(&format!("unsupported sync version: {}", self.0))?;
None.or_bad_request(format!("unsupported sync version: {}", self.0))?;
}
Ok(())
}

View File

@ -1,3 +1,3 @@
[toolchain]
# older versions may fail to compile; newer versions may fail the clippy tests
channel = "1.65"
channel = "1.66.1"

View File

@ -14,7 +14,6 @@ description = "workspace-hack package, managed by hakari"
### BEGIN HAKARI SECTION
[dependencies]
bstr = { version = "0.2", features = ["lazy_static", "regex-automata", "serde", "serde1", "serde1-nostd", "std", "unicode"] }
bytes = { version = "1", features = ["std"] }
crossbeam-utils = { version = "0.8", features = ["std"] }
either = { version = "1", features = ["use_std"] }
@ -28,6 +27,7 @@ hashbrown = { version = "0.12", features = ["ahash", "inline-more", "raw"] }
hmac = { version = "0.12", default-features = false, features = ["reset"] }
hyper = { version = "0.14", features = ["client", "full", "h2", "http1", "http2", "runtime", "server", "socket2", "stream", "tcp"] }
indexmap = { version = "1", default-features = false, features = ["std"] }
itertools = { version = "0.10", features = ["use_alloc", "use_std"] }
log = { version = "0.4", default-features = false, features = ["std"] }
num-traits = { version = "0.2", features = ["std"] }
phf_shared = { version = "0.11", default-features = false, features = ["std"] }
@ -36,7 +36,6 @@ rand-c38e5c1d305a1b54 = { package = "rand", version = "0.8", features = ["alloc"
rand-ca01ad9e24f5d932 = { package = "rand", version = "0.7", features = ["alloc", "getrandom", "getrandom_package", "libc", "rand_pcg", "small_rng", "std"] }
rand_core = { version = "0.6", default-features = false, features = ["alloc", "getrandom", "std"] }
regex = { version = "1", features = ["aho-corasick", "memchr", "perf", "perf-cache", "perf-dfa", "perf-inline", "perf-literal", "std", "unicode", "unicode-age", "unicode-bool", "unicode-case", "unicode-gencat", "unicode-perl", "unicode-script", "unicode-segment"] }
regex-automata = { version = "0.1", features = ["regex-syntax", "std"] }
regex-syntax = { version = "0.6", features = ["unicode", "unicode-age", "unicode-bool", "unicode-case", "unicode-gencat", "unicode-perl", "unicode-script", "unicode-segment"] }
reqwest = { version = "0.11", features = ["__rustls", "__tls", "blocking", "default-tls", "hyper-rustls", "hyper-tls", "json", "mime_guess", "multipart", "native-tls", "native-tls-crate", "rustls", "rustls-native-certs", "rustls-pemfile", "rustls-tls", "rustls-tls-native-roots", "rustls-tls-webpki-roots", "serde_json", "socks", "stream", "tokio-native-tls", "tokio-rustls", "tokio-socks", "tokio-util", "webpki-roots"] }
scopeguard = { version = "1", features = ["use_std"] }
@ -64,6 +63,7 @@ either = { version = "1", features = ["use_std"] }
getrandom = { version = "0.2", default-features = false, features = ["std"] }
hashbrown = { version = "0.12", features = ["ahash", "inline-more", "raw"] }
indexmap = { version = "1", default-features = false, features = ["std"] }
itertools = { version = "0.10", features = ["use_alloc", "use_std"] }
log = { version = "0.4", default-features = false, features = ["std"] }
phf_shared = { version = "0.11", default-features = false, features = ["std"] }
prost = { version = "0.11", features = ["prost-derive", "std"] }