Add a compiler error giving an actual reason if invalid features are active

This commit is contained in:
Emi Tatsuo 2020-12-03 00:06:48 -05:00
parent 9feb555b20
commit 23c5141dd0
Signed by: Emi
GPG key ID: 68FAB2E2E6DFC98B

View file

@ -1,5 +1,11 @@
#[macro_use] extern crate log; #[macro_use] extern crate log;
#[cfg(all(feature = "gemini_srv", feature = "scgi_srv"))]
compile_error!("Please enable only one of either the `gemini_srv` or `scgi_srv` features on the kochab crate");
#[cfg(not(any(feature = "gemini_srv", feature = "scgi_srv")))]
compile_error!("Please enable at least one of either the `gemini_srv` or `scgi_srv` features on the kochab crate");
use std::{ use std::{
sync::Arc, sync::Arc,
time::Duration, time::Duration,