Switch to version_check (#220)
version_check has fewer dependencies, and is already used by proc-macro-error and Rocket.
This commit is contained in:
parent
250d93df9a
commit
64390ec0ce
2 changed files with 3 additions and 6 deletions
|
@ -26,7 +26,7 @@ futures = { version = "0.3.0", optional = true }
|
||||||
actix-web-dep = { version = "2.0.0", optional = true, default-features = false, package = "actix-web" }
|
actix-web-dep = { version = "2.0.0", optional = true, default-features = false, package = "actix-web" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
rustc_version = "0.2.3"
|
version_check = "0.9.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
trybuild = { version = "1.0.33", features = ["diff"] }
|
trybuild = { version = "1.0.33", features = ["diff"] }
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
use rustc_version::{version_meta, Channel};
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
match version_meta().map(|v| v.channel).unwrap_or(Channel::Stable) {
|
if version_check::is_feature_flaggable() == Some(true) {
|
||||||
Channel::Dev | Channel::Nightly => println!("cargo:rustc-cfg=unstable"),
|
println!("cargo:rustc-cfg=unstable");
|
||||||
Channel::Beta | Channel::Stable => {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue