diff --git a/src/message.rs b/src/message.rs index c27dc02..9e3cf95 100644 --- a/src/message.rs +++ b/src/message.rs @@ -63,7 +63,6 @@ impl From for Action { MsgAction::Create(_) => Action::Create, MsgAction::Delete(_) => Action::Delete, MsgAction::Error(_) => Action::Error, - MsgAction::OnAction(_) => Action::OnAction, MsgAction::Query(_) => Action::Query, MsgAction::Records(_) => Action::Records, MsgAction::Register(_) => Action::Register, @@ -128,7 +127,6 @@ enum MsgAction { // Alter // Remove Error(MTTError), - OnAction(OnAction), Query(QueryType), Records(RecordIter), Register(Register), @@ -2550,55 +2548,6 @@ mod additions { } } -#[derive(Clone, Debug, Eq, PartialEq)] -enum OnType { - Query, - Update, -} - -#[derive(Clone, Debug)] -struct OnAction { - on_type: OnType, - oids: HashSet, -} - -impl OnAction { - fn new(on_type: OnType, oids: HashSet) -> Self { - Self { - on_type: on_type, - oids: oids, - } - } - - fn get_type(&self) -> &OnType { - &self.on_type - } - - fn get_oids(&self) -> &HashSet { - &self.oids - } -} - -#[cfg(test)] -mod ons { - use super::*; - - #[test] - fn can_create_on_action() { - let count = 5; - let values = [OnType::Query, OnType::Update]; - for on_type in values.iter() { - let mut oids: HashSet = HashSet::new(); - while oids.len() < count { - oids.insert(Oid::new()); - } - let result = OnAction::new(on_type.clone(), oids.clone()); - assert_eq!(result.get_type(), on_type); - assert_eq!(result.get_oids(), &oids); - } - } -} - #[derive(Clone, Debug)] enum IndexType { Index, @@ -2614,16 +2563,6 @@ impl IndexType { } } -#[derive(Clone, Debug)] -struct Triggers { - /* - * HashMap> - * document name - * action type - * response action - */ -} - #[derive(Clone, Debug)] struct DocDef { doc_names: Vec,