Skip to content

Commit

Permalink
Add compile error for missing feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragarnoy committed Nov 6, 2024
1 parent b073b03 commit 28d6da2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(not(test), no_std)]

#[cfg(not(any(feature = "blocking", feature = "non-blocking")))]
compile_error!("At least one of the blocking or non-blocking features must be enabled");

#[cfg(feature = "blocking")]
pub use parser::blocking;
#[cfg(feature = "non-blocking")]
Expand Down

0 comments on commit 28d6da2

Please sign in to comment.