build: Emit a warning when deprecated deflate-miniz is used

This commit is contained in:
Chris Hennick 2024-04-29 16:49:43 -07:00
parent fd0a1133a5
commit 122ff1f8cb
No known key found for this signature in database
GPG key ID: DA47AABA4961C509
2 changed files with 8 additions and 0 deletions

View file

@ -16,6 +16,7 @@ Library to support the reading and writing of zip files.
"""
edition = "2021"
exclude = ["tests/**", "examples/**", ".github/**", "fuzz/**"]
build = "src/build.rs"
[workspace.dependencies]
time = { version = "0.3.36", default-features = false }

7
src/build.rs Normal file
View file

@ -0,0 +1,7 @@
use std::env::var;
fn main() {
if var("CARGO_FEATURE_DEFLATE_MINIZ").is_ok() {
println!("cargo::warning=Feature `deflate-miniz` is deprecated; replace it with `deflate`");
}
}