Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
fix unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
pleshevskiy committed Jul 18, 2022
1 parent 35c9be1 commit 9466be1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/channels/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
}
4 changes: 4 additions & 0 deletions src/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@ impl Dest {
}
}

#[cfg(feature = "ingest")]
#[derive(Debug)]
pub(crate) struct OptDest {
pub(crate) collection: String,
pub(crate) bucket: Option<String>,
pub(crate) object: Option<String>,
}

#[cfg(feature = "ingest")]
impl OptDest {
pub(crate) fn col(c: impl ToString) -> Self {
Self {
Expand All @@ -144,6 +146,7 @@ impl OptDest {
}
}

#[cfg(feature = "ingest")]
impl From<Dest> for OptDest {
fn from(d: Dest) -> Self {
Self {
Expand All @@ -154,6 +157,7 @@ impl From<Dest> for OptDest {
}
}

#[cfg(feature = "ingest")]
impl From<ObjDest> for OptDest {
fn from(ObjDest(dest, obj): ObjDest) -> Self {
Self {
Expand Down

0 comments on commit 9466be1

Please sign in to comment.