Repository: mozilla/cargo-vet
Pull request #651 (2025-02-10 19:10:05)

Bump to 0.10.1


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3563878..6c436a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
 
 Nothing yet
 
+# Version 0.10.1 (2025-02-10)
+
+* `cargo vet` will no longer prompt to renew expiring wildcard audits for inactive crates (#648)
+* `cargo vet renew --expiring` will no longer renew expiring wildcard audits for inactive crates (#649)
+
 # Version 0.10.0 (2024-10-03)
 
 * Various improvements to the diff and inspect subcommands:
diff --git a/Cargo.lock b/Cargo.lock
index 5c22d9c..ea52625 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -143,7 +143,7 @@ dependencies = [
 
 [[package]]
 name = "cargo-vet"
-version = "0.10.0"
+version = "0.10.1"
 dependencies = [
  "base64-stream",
  "bytes",
diff --git a/Cargo.toml b/Cargo.toml
index 85a16f2..5113989 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "cargo-vet"
-version = "0.10.0"
+version = "0.10.1"
 edition = "2021"
 authors = ["Bobby Holley <bobbyholley@gmail.com>"]
 license = "Apache-2.0/MIT"
diff --git a/src/flock.rs b/src/flock.rs
index 4268c09..6790ff7 100644
--- a/src/flock.rs
+++ b/src/flock.rs
@@ -337,7 +337,7 @@ mod sys {
     }
 
     pub(super) fn error_contended(err: &Error) -> bool {
-        err.raw_os_error().map_or(false, |x| x == libc::EWOULDBLOCK)
+        err.raw_os_error() == Some(libc::EWOULDBLOCK)
     }
 
     pub(super) fn error_unsupported(err: &Error) -> bool {
diff --git a/src/main.rs b/src/main.rs
index 4ad654f..fb89200 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2985,7 +2985,7 @@ async fn check_audit_as_crates_io(
                 let matches_crates_io_package = cache
                     .crates_io_info(network, &package.name)
                     .await
-                    .map_or(false, |entry| entry.metadata.consider_as_same(package));
+                    .is_ok_and(|entry| entry.metadata.consider_as_same(package));
 
                 if matches_crates_io_package && audit_policy.is_none() {
                     // We found a package that has similar metadata to one with the same name
diff --git a/src/resolver.rs b/src/resolver.rs
index 14f383b..f4069fa 100644
--- a/src/resolver.rs
+++ b/src/resolver.rs
@@ -1793,23 +1793,22 @@ impl ResolveReport<'_> {
                     // those we find, if any.
                     let trust_hint = {
                         let mut exact_version = false;
-                        let id_for_hint = if publisher_id
-                            .map_or(false, |i| trusted_publishers.contains_key(&i))
-                        {
-                            exact_version = true;
-                            publisher_id
-                        } else if !store.audits.trusted.contains_key(package.name) {
-                            crates_io_info.as_ref().and_then(|metadata| {
-                                metadata
-                                    .versions
-                                    .iter()
-                                    .rev()
-                                    .filter_map(|(_, details)| details.published_by)
-                                    .find(|i| trusted_publishers.contains_key(i))
-                            })
-                        } else {
-                            None
-                        };
+                        let id_for_hint =
+                            if publisher_id.is_some_and(|i| trusted_publishers.contains_key(&i)) {
+                                exact_version = true;
+                                publisher_id
+                            } else if !store.audits.trusted.contains_key(package.name) {
+                                crates_io_info.as_ref().and_then(|metadata| {
+                                    metadata
+                                        .versions
+                                        .iter()
+                                        .rev()
+                                        .filter_map(|(_, details)| details.published_by)
+                                        .find(|i| trusted_publishers.contains_key(i))
+                                })
+                            } else {
+                                None
+                            };
 
                         id_for_hint.map(|id| {
                             let mut trusted_by: Vec<String> = trusted_publishers
diff --git a/src/storage.rs b/src/storage.rs
index fcfa6b6..ab84c59 100644
--- a/src/storage.rs
+++ b/src/storage.rs
@@ -2176,7 +2176,7 @@ impl Cache {
             if !entry
                 .file_name()
                 .to_str()
-                .map_or(false, |name| CACHE_ALLOWED_FILES.contains(&name))
+                .is_some_and(|name| CACHE_ALLOWED_FILES.contains(&name))
             {
                 remove_dir_entry(&entry).await?;
             }


Test patch:
diff --git a/tests/snapshots/test_cli__long-help.snap b/tests/snapshots/test_cli__long-help.snap
index fd46b85..f37be05 100644
--- a/tests/snapshots/test_cli__long-help.snap
+++ b/tests/snapshots/test_cli__long-help.snap
@@ -3,7 +3,7 @@ source: tests/test-cli.rs
 expression: format_outputs(&output)
 ---
 stdout:
-cargo-vet 0.10.0
+cargo-vet 0.10.1
 Supply-chain security for Rust
 
 When run without a subcommand, `cargo vet` will invoke the `check` subcommand. See `cargo vet help
diff --git a/tests/snapshots/test_cli__markdown-help.snap b/tests/snapshots/test_cli__markdown-help.snap
index 51f84c6..c1e2e23 100644
--- a/tests/snapshots/test_cli__markdown-help.snap
+++ b/tests/snapshots/test_cli__markdown-help.snap
@@ -7,7 +7,7 @@ stdout:
 
 > This manual can be regenerated with `cargo vet help-markdown`
 
-Version: `cargo-vet 0.10.0`
+Version: `cargo-vet 0.10.1`
 
 Supply-chain security for Rust
 
diff --git a/tests/snapshots/test_cli__short-help.snap b/tests/snapshots/test_cli__short-help.snap
index 2c07879..8a1cf09 100644
--- a/tests/snapshots/test_cli__short-help.snap
+++ b/tests/snapshots/test_cli__short-help.snap
@@ -3,7 +3,7 @@ source: tests/test-cli.rs
 expression: format_outputs(&output)
 ---
 stdout:
-cargo-vet 0.10.0
+cargo-vet 0.10.1
 Supply-chain security for Rust
 
 USAGE: