[][src]Macro check_latest::check_max

macro_rules! check_max {
    () => { ... };
}

Checks if there is a version available that is greater than the current version.

Returns

Assume the current version is a.b.c, and we are looking at versions that are x.y.z.

  • Ok(Some(version)) if x.y.z > a.b.c where version = max x.y.z
  • Ok(None) if no version meets the rule x.y.z > a.b.c
  • Err(e) if comparison could not be made

Example

use check_latest::check_max;

if let Ok(Some(version)) = check_max!() {
    println!("A new version is available: {}", version);
}