cmp_versions

Function cmp_versions 

Source
pub fn cmp_versions(ver1: &str, ver2: &str) -> i32
Expand description

Compares two package versions, ver1 and ver2. The returned integer’s value is mapped to one of the following integers:

  • Less than 0: ver1 is less than ver2.
  • Equal to 0: ver1 is equal to ver2.
  • Greater than 0: ver1 is greater than ver2.

Unless you have a specific need for otherwise, you should probably use crate::util::cmp_versions instead.