version_operators 0.0.1

Rust library for comparing and manipulating version numbers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

use version_operators::Version;


#[test]
fn subtract_from_str() {
    let version = Version::from_str("1.14.3") - Version::from_str("1.14.2");
    assert!(version.to_vector() == vec![0, 0, 1]);
}


#[test]
fn subtract_assign_from_str() {
    let mut version = Version::from_str("1.14.3");
    version -= Version::from_str("1.14.2");
    assert!(version.to_vector() == vec![0, 0, 1]);
}