pub fn is_major(current: &str, other: &str) -> Result<bool>
Expand description

Check if a the “other” version is a major bump from the “current”.

Examples

use tauri::api::version::is_major;
assert!(is_major("1.0.0", "2.0.0").unwrap());
assert!(is_major("1.5.0", "2.17.10").unwrap());
assert!(is_major("0.5.0", "2.17.10").unwrap());
assert!(!is_major("1.1.5", "1.2.5").unwrap());
assert!(!is_major("0.14.0", "0.15.0").unwrap());