diff --git a/src/channels/mod.rs b/src/channels/mod.rs index 9ecffa9..57a52df 100644 --- a/src/channels/mod.rs +++ b/src/channels/mod.rs @@ -210,8 +210,11 @@ mod tests { #[test] fn format_channel_enums() { + #[cfg(feature = "search")] assert_eq!(format!("{}", ChannelMode::Search), String::from("search")); + #[cfg(feature = "ingest")] assert_eq!(format!("{}", ChannelMode::Ingest), String::from("ingest")); + #[cfg(feature = "control")] assert_eq!(format!("{}", ChannelMode::Control), String::from("control")); } } diff --git a/src/misc.rs b/src/misc.rs index 5526bcb..ecade21 100644 --- a/src/misc.rs +++ b/src/misc.rs @@ -111,6 +111,7 @@ impl Dest { } } +#[cfg(feature = "ingest")] #[derive(Debug)] pub(crate) struct OptDest { pub(crate) collection: String, @@ -118,6 +119,7 @@ pub(crate) struct OptDest { pub(crate) object: Option, } +#[cfg(feature = "ingest")] impl OptDest { pub(crate) fn col(c: impl ToString) -> Self { Self { @@ -144,6 +146,7 @@ impl OptDest { } } +#[cfg(feature = "ingest")] impl From for OptDest { fn from(d: Dest) -> Self { Self { @@ -154,6 +157,7 @@ impl From for OptDest { } } +#[cfg(feature = "ingest")] impl From for OptDest { fn from(ObjDest(dest, obj): ObjDest) -> Self { Self {