Skip to content

Commit

Permalink
2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fosskers committed Jan 23, 2021
1 parent 011be33 commit f81f14d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# `versions` Changelog

## 2.0.2 (2021-01-23)

#### Changed

- Updated to `itertools-0.10`.

## 2.0.1 (2020-11-19)

#### Changed
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "versions"
version = "2.0.1"
version = "2.0.2"
authors = ["Colin Woodbury <[email protected]>"]
edition = "2018"
description = "A library for parsing and comparing software version numbers."
Expand All @@ -13,7 +13,7 @@ categories = ["parser-implementations"]

[dependencies]
nom = "6.0"
itertools = "0.9"
itertools = "0.10"

[dev-dependencies]
version-sync = "0.9"
16 changes: 8 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
//! assert!(good > evil); // We can compare them anyway!
//! ```
#![doc(html_root_url = "https://docs.rs/versions/2.0.1")]
#![doc(html_root_url = "https://docs.rs/versions/2.0.2")]

use itertools::EitherOrBoth::{Both, Left, Right};
use itertools::Itertools;
Expand Down Expand Up @@ -1154,24 +1154,24 @@ mod tests {
"1.2.3-alpha.2+a1b2c3.1",
];

goods.iter().for_each(|s| {
for s in goods {
assert_eq!(
Some(s.to_string()),
SemVer::new(s).map(|sv| format!("{}", sv))
)
});
}
}

#[test]
fn good_semvers() {
let goods = vec!["0.4.8-1", "7.42.13-4", "2.1.16102-2"];
let goods = vec!["0.4.8-1", "7.42.13-4", "2.1.16102-2", "2.2.1-b05"];

goods.iter().for_each(|s| {
for s in goods {
assert_eq!(
Some(s.to_string()),
SemVer::new(s).map(|sv| format!("{}", sv))
)
});
}
}

#[test]
Expand Down Expand Up @@ -1204,12 +1204,12 @@ mod tests {
"1.0.0",
];

svs.iter().zip(&svs[1..]).for_each(|(a, b)| {
for (a, b) in svs.iter().zip(&svs[1..]) {
let x = SemVer::new(a).unwrap();
let y = SemVer::new(b).unwrap();

assert!(x < y, "{} < {}", x, y);
});
}
}

#[test]
Expand Down

0 comments on commit f81f14d

Please sign in to comment.