Skip to main content

version_matches_range

Function version_matches_range 

Source
pub(crate) fn version_matches_range(
    version: Option<&Version>,
    constraints: &[String],
) -> bool
Expand description

Check whether a version matches a list of OR-ed constraints.

  • version: the effective version to test, or None if unknown.
  • constraints: the list from from_range or to_range.

Returns true if version matches at least one entry.

Wildcard entries match any version including unknown. Non-wildcard entries against an unknown version return false.