Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ring workaround version check #234

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/licenses/workarounds/ring.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use super::ClarificationFile;
use anyhow::Context as _;
use krates::cm::semver::Version;

pub fn get(krate: &crate::Krate) -> anyhow::Result<Option<super::Clarification>> {
if krate.name != "ring" {
Expand All @@ -8,8 +9,9 @@ pub fn get(krate: &crate::Krate) -> anyhow::Result<Option<super::Clarification>>

// Older versions of ring tend to get yanked so instead of covering all versions
// we just cover the current stable version
let min_version = Version::new(0, 16, 0);
anyhow::ensure!(
krate.version.minor == 16,
krate.version >= min_version,
"version {} is not covered, please file a PR to add it",
krate.version
);
Expand Down