From 9bdf23a659ee6a03f64b46f3d3acdfab8e4cdbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Wed, 19 Nov 2025 09:12:01 -0500 Subject: [PATCH] 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 --- Cargo.toml | 2 -- build.rs | 7 ------- 2 files changed, 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e7f6f07..e830164 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,8 +42,6 @@ serde = { version = "1.0.196", features = ["derive"] } serde_json = "1.0.113" strip-ansi-escapes = "0.2.0" -[build-dependencies] -rustc_version = "0.2" [features] default = ["derive", "std"] diff --git a/build.rs b/build.rs index 296a4eb..23e7655 100644 --- a/build.rs +++ b/build.rs @@ -1,15 +1,8 @@ -use rustc_version::{version_meta, Channel}; - 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 println!("cargo:rustc-cfg=track_caller"); // Add check-cfg for conditional configurations println!("cargo:rustc-check-cfg=cfg(doc_cfg)"); println!("cargo:rustc-check-cfg=cfg(track_caller)"); - println!("cargo:rustc-check-cfg=cfg(nightly)"); }