From 14d9b55a1e7405b5aa3eef92b8eb3b00ff238d0c Mon Sep 17 00:00:00 2001 From: Tom Solberg Date: Mon, 9 Oct 2023 15:48:50 +0200 Subject: [PATCH] Small fixes before releasing stable (#50) One of our deps (`hermit-abi@0.3.1`) had been yanked, so bumped it. Also found some other `cargo deny` issues so the whole CLI component from duplicate version detection since it's not going to be a problem for "downstream integrations". --- Cargo.lock | 6 +++--- crates/cervo-cli/src/commands/to_nnef.rs | 4 ++-- crates/cervo-runtime/src/runtime/ticket.rs | 4 ++-- deny.toml | 2 +- release.toml | 1 + 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a113098..034c74c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -447,9 +447,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "instant" @@ -476,7 +476,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.3", "io-lifetimes", "rustix", "windows-sys 0.45.0", diff --git a/crates/cervo-cli/src/commands/to_nnef.rs b/crates/cervo-cli/src/commands/to_nnef.rs index 8e7e866..147215c 100644 --- a/crates/cervo-cli/src/commands/to_nnef.rs +++ b/crates/cervo-cli/src/commands/to_nnef.rs @@ -46,7 +46,7 @@ pub(super) fn onnx_to_nnef(config: ToNnefArgs) -> Result<()> { } = config; match in_file.extension().and_then(|ext| ext.to_str()) { - Some(ext) if ext == "onnx" => {} + Some("onnx") => {} Some(ext) => bail!("unexpected extension: {:?}", ext), None => bail!("file without extension: {:?}", in_file), } @@ -71,7 +71,7 @@ pub(super) fn onnx_to_nnef(config: ToNnefArgs) -> Result<()> { pub(super) fn batch_onnx_to_nnef(config: BatchToNnefArgs) -> Result<()> { for file in &config.in_files { match file.extension().and_then(|ext| ext.to_str()) { - Some(ext) if ext == "onnx" => {} + Some("onnx") => {} Some(ext) => bail!("unexpected extension: {:?}", ext), None => bail!("file without extension: {:?}", file), } diff --git a/crates/cervo-runtime/src/runtime/ticket.rs b/crates/cervo-runtime/src/runtime/ticket.rs index 375a307..af2a8e4 100644 --- a/crates/cervo-runtime/src/runtime/ticket.rs +++ b/crates/cervo-runtime/src/runtime/ticket.rs @@ -16,13 +16,13 @@ impl Eq for Ticket {} impl PartialOrd for Ticket { fn partial_cmp(&self, other: &Self) -> Option { - other.0.partial_cmp(&self.0) + Some(self.cmp(other)) } } impl Ord for Ticket { fn cmp(&self, other: &Ticket) -> Ordering { - self.partial_cmp(other).unwrap() + other.0.cmp(&self.0) } } diff --git a/deny.toml b/deny.toml index 98da1b1..9f453f8 100644 --- a/deny.toml +++ b/deny.toml @@ -178,7 +178,7 @@ skip = [ # dependencies starting at the specified crate, up to a certain depth, which is # by default infinite skip-tree = [ - #{ name = "ansi_term", version = "=0.11.0", depth = 20 }, + { name = "cervo-cli", depth = 20 }, ] # This section is considered when running `cargo deny check sources`. diff --git a/release.toml b/release.toml index 57d0f08..a4db0af 100644 --- a/release.toml +++ b/release.toml @@ -2,3 +2,4 @@ pre-release-commit-message = "Release {{version}}" tag-message = "Release {{version}}" tag-name = "{{version}}" consolidate-commits = true +shared-version = true