version_matches

Function version_matches 

Source
pub fn version_matches(
    current_version: &str,
    min_version: Option<&str>,
    max_version: Option<&str>,
) -> bool
Expand description

What: Check if current version matches the version range.

Inputs:

  • current_version: Current app version (e.g., “0.6.0”).
  • min_version: Optional minimum version (inclusive).
  • max_version: Optional maximum version (inclusive).

Output:

  • true if current version is within the range, false otherwise.

Details:

  • If min_version is None, no lower bound check.
  • If max_version is None, no upper bound check.
  • Both bounds are inclusive.