From d7e1d959d6636a351135fa019b06d448ea9aa02f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Oct 2022 03:48:27 +0000 Subject: [PATCH 1/6] Bump clap from 3.2.20 to 4.0.13 Bumps [clap](https://github.com/clap-rs/clap) from 3.2.20 to 4.0.13. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.20...v4.0.13) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 32 ++++---------------------------- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e68bc44..5f55b69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,24 +51,22 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.2.20" +version = "4.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b71c3ce99b7611011217b366d923f1d0a7e07a92bb2dbf1e84508c673ca3bd" +checksum = "69d64e88428747154bd8bc378d178377ef4dace7a5735ca1f3855be72f2c2cb5" dependencies = [ "atty", "bitflags", "clap_lex", - "indexmap", "strsim", "termcolor", - "textwrap", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" dependencies = [ "os_str_bytes", ] @@ -189,12 +187,6 @@ version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hermit-abi" version = "0.1.19" @@ -219,16 +211,6 @@ dependencies = [ "png", ] -[[package]] -name = "indexmap" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" -dependencies = [ - "autocfg", - "hashbrown", -] - [[package]] name = "jpeg-decoder" version = "0.2.6" @@ -533,12 +515,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "textwrap" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" - [[package]] name = "thread_local" version = "1.1.4" diff --git a/Cargo.toml b/Cargo.toml index 710e41b..b854803 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ glam = "0.21" rand = { version = "0.8", features = ["small_rng"] } rayon = "1.5.3" crossbeam = "0.8.2" -clap = "3.2" +clap = "4.0" num_cpus = "1.13.1" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } From da1261429760f99161650934cda8b3455b897e27 Mon Sep 17 00:00:00 2001 From: Li Yuanheng <520dhh@gmail.com> Date: Wed, 12 Oct 2022 14:09:35 +0800 Subject: [PATCH 2/6] update to clap 4.0 --- src/cli.rs | 39 +++++++++++++++++++++------------------ src/main.rs | 2 +- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 249890a..6fc5dda 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,4 +1,4 @@ -use clap::{App, Arg}; +use clap::{Arg, Command}; fn integer_non_zero_validator(s: String) -> Result<(), String> { match s.parse::() { @@ -27,24 +27,27 @@ impl clap::builder::TypedValueParser for AspectRatioParser { ) -> Result { if let Some((w, h)) = value.to_str().unwrap().split_once(':') { let w: crate::Float = w.parse::().map_err(|_| { - clap::Error::raw(clap::ErrorKind::InvalidValue, "cannot parse width in ratio") + clap::Error::raw( + clap::error::ErrorKind::InvalidValue, + "cannot parse width in ratio", + ) })?; let h: crate::Float = h.parse::().map_err(|_| { clap::Error::raw( - clap::ErrorKind::InvalidValue, + clap::error::ErrorKind::InvalidValue, "cannot parse height in ratio", ) })?; if w == 0.0 || h == 0.0 { return Err(clap::Error::raw( - clap::ErrorKind::InvalidValue, + clap::error::ErrorKind::InvalidValue, "w and h cannot be zero", )); } Ok((w, h)) } else { Err(clap::Error::raw( - clap::ErrorKind::InvalidValue, + clap::error::ErrorKind::InvalidValue, "ratio must have format w:h", )) } @@ -61,40 +64,40 @@ fn aspect_ratio_validator(s: String) -> Result<(), String> { } } -pub fn build_app() -> App<'static> { - App::new(env!("CARGO_PKG_NAME")) +pub fn build_app() -> Command { + Command::new(env!("CARGO_PKG_NAME")) .author(env!("CARGO_PKG_AUTHORS")) .about(env!("CARGO_PKG_DESCRIPTION")) .version(env!("CARGO_PKG_VERSION")) .arg( - Arg::with_name("scene") + Arg::new("scene") .default_value("0") .value_parser(clap::builder::RangedU64ValueParser::::new().range(0..=8)) - .takes_value(true) + .num_args(1) .long("scene"), ) .arg( - Arg::with_name("width") - .takes_value(true) + Arg::new("width") + .num_args(1) .long("width") .value_parser(clap::builder::RangedU64ValueParser::::new().range(1..=100000)), ) .arg( - Arg::with_name("aspect ratio") - .takes_value(true) + Arg::new("aspect ratio") + .num_args(1) .long("ratio") .value_parser(AspectRatioParser), ) .arg( - Arg::with_name("samples per pixel") - .takes_value(true) + Arg::new("samples per pixel") + .num_args(1) .long("samples") .value_parser(clap::builder::RangedU64ValueParser::::new().range(1..=100000)), ) - .arg(Arg::with_name("use bvh").takes_value(false).long("bvh")) + .arg(Arg::new("use bvh").long("bvh")) .arg( - Arg::with_name("job") - .takes_value(true) + Arg::new("job") + .num_args(1) .short('j') .value_parser(clap::value_parser!(u32).range(1..)), ) diff --git a/src/main.rs b/src/main.rs index 137f8d8..a14e102 100644 --- a/src/main.rs +++ b/src/main.rs @@ -78,7 +78,7 @@ fn main() { // Parameters let matches = cli::build_app().get_matches(); let scene = matches.get_one::("scene").unwrap(); - let use_bvh = matches.is_present("use bvh"); + let use_bvh = matches.get_flag("use bvh"); let threads = matches .get_one::("job") .copied() From 0f06e7af9412676186fafcb2b5432c7a20fefcd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 03:17:03 +0000 Subject: [PATCH 3/6] Bump clap from 4.0.13 to 4.0.18 Bumps [clap](https://github.com/clap-rs/clap) from 4.0.13 to 4.0.18. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.0.13...v4.0.18) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5f55b69..e99b1b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,9 +51,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.0.13" +version = "4.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d64e88428747154bd8bc378d178377ef4dace7a5735ca1f3855be72f2c2cb5" +checksum = "335867764ed2de42325fafe6d18b8af74ba97ee0c590fa016f157535b42ab04b" dependencies = [ "atty", "bitflags", From b6f83721ead235d761000e79bfd51a8bf16d6126 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 03:17:08 +0000 Subject: [PATCH 4/6] Bump glam from 0.21.3 to 0.22.0 Bumps [glam](https://github.com/bitshifter/glam-rs) from 0.21.3 to 0.22.0. - [Release notes](https://github.com/bitshifter/glam-rs/releases) - [Changelog](https://github.com/bitshifter/glam-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitshifter/glam-rs/compare/0.21.3...0.22.0) --- updated-dependencies: - dependency-name: glam dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5f55b69..c3398e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -183,9 +183,9 @@ dependencies = [ [[package]] name = "glam" -version = "0.21.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" +checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774" [[package]] name = "hermit-abi" diff --git a/Cargo.toml b/Cargo.toml index b854803..9a1ded7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] image = { version = "0.24", default-features = false, features = ["png", "jpeg"] } -glam = "0.21" +glam = "0.22" rand = { version = "0.8", features = ["small_rng"] } rayon = "1.5.3" crossbeam = "0.8.2" From 05ade25046439325652e08a1620290c8536e2f5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Jan 2023 03:07:18 +0000 Subject: [PATCH 5/6] Bump num_cpus from 1.13.1 to 1.15.0 Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.13.1 to 1.15.0. - [Release notes](https://github.com/seanmonstar/num_cpus/releases) - [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.13.1...v1.15.0) --- updated-dependencies: - dependency-name: num_cpus dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 17 +++++++++++++---- Cargo.toml | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ae71eb..17b7b8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,7 +14,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -196,6 +196,15 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + [[package]] name = "image" version = "0.24.4" @@ -307,11 +316,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 9a1ded7..9170bc6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ rand = { version = "0.8", features = ["small_rng"] } rayon = "1.5.3" crossbeam = "0.8.2" clap = "4.0" -num_cpus = "1.13.1" +num_cpus = "1.15.0" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } From 14739df41456227e5b6b3c58bed03fa45848a0ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 03:58:41 +0000 Subject: [PATCH 6/6] Bump image from 0.24.4 to 0.24.6 Bumps [image](https://github.com/image-rs/image) from 0.24.4 to 0.24.6. - [Release notes](https://github.com/image-rs/image/releases) - [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md) - [Commits](https://github.com/image-rs/image/commits) --- updated-dependencies: - dependency-name: image dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 17b7b8c..fc7aab5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -207,9 +207,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.4" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd8e4fb07cf672b1642304e731ef8a6a4c7891d67bb4fd4f5ce58cd6ed86803c" +checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" dependencies = [ "bytemuck", "byteorder", @@ -222,9 +222,9 @@ dependencies = [ [[package]] name = "jpeg-decoder" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9478aa10f73e7528198d75109c8be5cd7d15fb530238040148d5f9a22d4c5b3b" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" [[package]] name = "lazy_static"