Skip to content

Commit

Permalink
feat: show clear compiler error when no backend is chosen. (rust-lang…
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jul 5, 2023
1 parent 2684a56 commit 9e4979e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@
#![cfg_attr(test, deny(warnings))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

#[cfg(not(any(
feature = "rust_backend",
feature = "zlib",
feature = "zlib-default",
feature = "zlib-ng",
feature = "zlib-ng-compat",
feature = "cloudflare-zlib"
)))]
compile_error!(
"You need to choose a zlib backend"
);

pub use crate::crc::{Crc, CrcReader, CrcWriter};
pub use crate::gz::GzBuilder;
pub use crate::gz::GzHeader;
Expand Down

0 comments on commit 9e4979e

Please sign in to comment.