Macro check_latest::check_patch[][src]

macro_rules! check_patch {
    () => { ... };
}
Expand description

Checks if there is a higher patch available, within the same major.minor version.

Returns

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

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

Example

use check_latest::check_patch;

if let Ok(Some(version)) = check_patch!() {
    println!("We've implemented one or more bug fixes in {}", version);
}