mirror of https://github.com/zkat/miette.git
fix: remove unused rustc_version dependency and simplify build.rs
- Remove rustc_version build dependency that was no longer needed - Remove nightly detection since nightly cfg flag wasn't used anywhere - Simplify build.rs to only set track_caller cfg flag
This commit is contained in:
parent
9af0988e52
commit
9bdf23a659
|
|
@ -42,8 +42,6 @@ serde = { version = "1.0.196", features = ["derive"] }
|
||||||
serde_json = "1.0.113"
|
serde_json = "1.0.113"
|
||||||
strip-ansi-escapes = "0.2.0"
|
strip-ansi-escapes = "0.2.0"
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
rustc_version = "0.2"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["derive", "std"]
|
default = ["derive", "std"]
|
||||||
|
|
|
||||||
7
build.rs
7
build.rs
|
|
@ -1,15 +1,8 @@
|
||||||
use rustc_version::{version_meta, Channel};
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
if let Channel::Nightly = version_meta().unwrap().channel {
|
|
||||||
println!("cargo:rustc-cfg=nightly")
|
|
||||||
}
|
|
||||||
|
|
||||||
// track_caller is stable since Rust 1.46 (2020), so no version check needed
|
// track_caller is stable since Rust 1.46 (2020), so no version check needed
|
||||||
println!("cargo:rustc-cfg=track_caller");
|
println!("cargo:rustc-cfg=track_caller");
|
||||||
|
|
||||||
// Add check-cfg for conditional configurations
|
// Add check-cfg for conditional configurations
|
||||||
println!("cargo:rustc-check-cfg=cfg(doc_cfg)");
|
println!("cargo:rustc-check-cfg=cfg(doc_cfg)");
|
||||||
println!("cargo:rustc-check-cfg=cfg(track_caller)");
|
println!("cargo:rustc-check-cfg=cfg(track_caller)");
|
||||||
println!("cargo:rustc-check-cfg=cfg(nightly)");
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue