Skip to content

Commit

Permalink
Bump version-compare to 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
timvisee authored and gdesmott committed Oct 15, 2021
1 parent 256cd64 commit 38d7447
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "README.md"
[dependencies]
pkg-config = "0.3"
toml = { version = "0.5", default-features = false }
version-compare = "0.0.11"
version-compare = "0.1"
heck = "0.3"
cfg-expr = "0.9"

Expand Down
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ use std::env;
use std::fmt;
use std::path::{Path, PathBuf};
use std::str::FromStr;
use version_compare::VersionCompare;

mod metadata;
use metadata::MetaData;
Expand Down Expand Up @@ -688,7 +687,7 @@ impl Config {
// Pick the highest feature enabled version
if !enabled_feature_overrides.is_empty() {
enabled_feature_overrides.sort_by(|a, b| {
VersionCompare::compare(&a.version, &b.version)
version_compare::compare(&a.version, &b.version)
.expect("failed to compare versions")
.ord()
.expect("invalid version")
Expand Down Expand Up @@ -784,8 +783,8 @@ impl Config {
};

// Check that the lib built internally matches the required version
match VersionCompare::compare(&lib.version, version) {
Ok(version_compare::CompOp::Lt) => Err(Error::BuildInternalWrongVersion(
match version_compare::compare(&lib.version, version) {
Ok(version_compare::Cmp::Lt) => Err(Error::BuildInternalWrongVersion(
name.into(),
lib.version.clone(),
version.into(),
Expand Down

0 comments on commit 38d7447

Please sign in to comment.