pub fn is_compatible(first: &str, second: &str) -> Result<bool>
Expand description

Check if the “second” semver is compatible with the “first”.

Examples

use tauri::api::version::is_compatible;
assert!(is_compatible("0.15.0", "0.15.5").unwrap());
assert!(!is_compatible("0.15.0", "0.16.5").unwrap());

assert!(is_compatible("1.5.0", "1.5.10").unwrap());
assert!(is_compatible("1.54.0", "1.55.0").unwrap());
assert!(!is_compatible("2.17.0", "3.17.0").unwrap());