-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc96869
commit 648b45c
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use nodejs_semver::{Version, VersionDiff}; | ||
|
||
fn main() { | ||
let v1 = Version::parse("1.2.3-rc.4").unwrap(); | ||
let v2 = Version::parse("1.2.3").unwrap(); | ||
|
||
let diff = v1.diff(&v2); | ||
|
||
assert_eq!(diff, Some(VersionDiff::Patch)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
use nodejs_semver::Version; | ||
|
||
fn main() { | ||
let v = Version::parse("1.2.3-rc.4").unwrap(); | ||
println!("{}", v); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters