fix unused code

This commit is contained in:
Dmitriy Pleshevskiy 2022-07-18 14:19:43 +03:00
parent 35c9be1837
commit 9466be194b
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 7 additions and 0 deletions

View file

@ -210,8 +210,11 @@ mod tests {
#[test] #[test]
fn format_channel_enums() { fn format_channel_enums() {
#[cfg(feature = "search")]
assert_eq!(format!("{}", ChannelMode::Search), String::from("search")); assert_eq!(format!("{}", ChannelMode::Search), String::from("search"));
#[cfg(feature = "ingest")]
assert_eq!(format!("{}", ChannelMode::Ingest), String::from("ingest")); assert_eq!(format!("{}", ChannelMode::Ingest), String::from("ingest"));
#[cfg(feature = "control")]
assert_eq!(format!("{}", ChannelMode::Control), String::from("control")); assert_eq!(format!("{}", ChannelMode::Control), String::from("control"));
} }
} }

View file

@ -111,6 +111,7 @@ impl Dest {
} }
} }
#[cfg(feature = "ingest")]
#[derive(Debug)] #[derive(Debug)]
pub(crate) struct OptDest { pub(crate) struct OptDest {
pub(crate) collection: String, pub(crate) collection: String,
@ -118,6 +119,7 @@ pub(crate) struct OptDest {
pub(crate) object: Option<String>, pub(crate) object: Option<String>,
} }
#[cfg(feature = "ingest")]
impl OptDest { impl OptDest {
pub(crate) fn col(c: impl ToString) -> Self { pub(crate) fn col(c: impl ToString) -> Self {
Self { Self {
@ -144,6 +146,7 @@ impl OptDest {
} }
} }
#[cfg(feature = "ingest")]
impl From<Dest> for OptDest { impl From<Dest> for OptDest {
fn from(d: Dest) -> Self { fn from(d: Dest) -> Self {
Self { Self {
@ -154,6 +157,7 @@ impl From<Dest> for OptDest {
} }
} }
#[cfg(feature = "ingest")]
impl From<ObjDest> for OptDest { impl From<ObjDest> for OptDest {
fn from(ObjDest(dest, obj): ObjDest) -> Self { fn from(ObjDest(dest, obj): ObjDest) -> Self {
Self { Self {