Skip to content

Commit

Permalink
Merge pull request #113 from dtolnay/version-check
Browse files Browse the repository at this point in the history
Switch to version_check
  • Loading branch information
dtolnay committed Aug 5, 2018
2 parents e714bee + 5a4923b commit 691419a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ version = "0.4.6"
optional = true

[build-dependencies]
rustc_version = "0.2.2"
version_check = "0.1.4"

[features]
nightly = []
Expand Down
6 changes: 2 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
extern crate rustc_version;

use rustc_version::{version, Version};
extern crate version_check;

fn main() {
let is_var_set = |s| std::env::var_os(s).is_some();
Expand All @@ -23,7 +21,7 @@ fn main() {
let nightly_feature_enabled = is_var_set("CARGO_FEATURE_NIGHTLY");
let spin_feature_enabled = is_var_set("CARGO_FEATURE_SPIN_NO_STD");

let version_geq_122 = version().unwrap() >= Version::new(1, 22, 0);
let version_geq_122 = version_check::is_min_version("1.22.0").unwrap().0;
let drop_in_static_supported = version_geq_122 || nightly_feature_enabled;

// precedence:
Expand Down

0 comments on commit 691419a

Please sign in to comment.