From 28d6da2671a7d6d116edf488ddfca43c6987a500 Mon Sep 17 00:00:00 2001 From: ragarnoy Date: Wed, 6 Nov 2024 18:05:18 +0100 Subject: [PATCH] Add compile error for missing feature flags --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index a595202..aa9bd7c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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")]