diff --git a/src/runtime2/connector.rs b/src/runtime2/connector.rs index 62d8485b808bf218348168b754d3be9965cefb34..7705f4569af80e9519147c0bce2d6a763eb7d0c6 100644 --- a/src/runtime2/connector.rs +++ b/src/runtime2/connector.rs @@ -517,15 +517,6 @@ impl ConnectorPDL { RoundConclusion::Failure => None, }; - // TODO: Hack - ctx.remove_messages(|m| match m { - Message::Data(_) | Message::SyncPort(_) | Message::SyncControl(_) | Message::Control(_) => false, - Message::SyncComp(m) => match m.content { - SyncCompContent::Notification | SyncCompContent::Presence(_) => true, - _ => false, - } - }); - if let Some(solution_branch_id) = final_branch_id { let mut fake_vec = Vec::new(); self.tree.end_sync(solution_branch_id); diff --git a/src/runtime2/scheduler.rs b/src/runtime2/scheduler.rs index 94adc0ef7b05e5ab570ecf219923b309aa5799ce..e7b6bc05c059714590c04c83b649bd68f9845c18 100644 --- a/src/runtime2/scheduler.rs +++ b/src/runtime2/scheduler.rs @@ -545,19 +545,6 @@ impl ComponentCtx { return Ok(()); } - /// Removes messages in the outbox using a match - pub(crate) fn remove_messages bool>(&mut self, remove_if_fn: F) { - let mut idx = 0; - while idx < self.outbox.len() { - let should_remove = remove_if_fn(&self.outbox[idx]); - if should_remove { - self.outbox.remove(idx); - } else { - idx += 1; - } - } - } - /// Notify that component just finished a sync block. Like /// `notify_sync_start`: drop out of the `Component::Run` function. pub(crate) fn notify_sync_end(&mut self, changed_ports: &[ComponentPortChange]) {