Skip to content

Commit

Permalink
doc: Add mod level documents
Browse files Browse the repository at this point in the history
  • Loading branch information
linyihai committed Jul 29, 2024
1 parent d000850 commit 1586c33
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cargo/util/semver_eval_ext.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
//! This module provides the [`matches_prerelease`] to extends the semantic for how to match a prerelease version.
//! Please refer to the semantic proposal, see
//! [3493-precise-pre-release-cargo-update](https://rust-lang.github.io/rfcs/3493-precise-pre-release-cargo-update.html)
//!
//! Thanks to [`semver`]'s prior art, we copied the private functions from it, which includes [`matches_exact`], [`matches_greater`], [`matches_less`].
//! The tests in [`matches_prerelease_semantic`] are designed to reflect the proposal semantic.
//!
use semver::{Comparator, Op, Prerelease, Version, VersionReq};

pub(crate) fn matches_prerelease(req: &VersionReq, ver: &Version) -> bool {
Expand Down

0 comments on commit 1586c33

Please sign in to comment.