MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / update

Method update

crates/firewheel-graph/src/graph.rs:763–786  ·  view source on GitHub ↗
(
        &mut self,
        stream_info: Option<&StreamInfo>,
        event_queue: &mut Vec<NodeEvent>,
    )

Source from the content-addressed store, hash-verified

761 }
762
763 pub(crate) fn update(
764 &mut self,
765 stream_info: Option<&StreamInfo>,
766 event_queue: &mut Vec<NodeEvent>,
767 ) {
768 let mut cull_list = false;
769 for node_id in self.nodes_to_call_update_method.iter() {
770 if let Some(node_entry) = self.nodes.get_mut(node_id.0) {
771 node_entry.dyn_node.update(UpdateContext::new(
772 *node_id,
773 stream_info,
774 &mut node_entry.info.custom_state,
775 event_queue,
776 ));
777 } else {
778 cull_list = true;
779 }
780 }
781
782 if cull_list {
783 self.nodes_to_call_update_method
784 .retain(|node_id| self.nodes.contains(node_id.0));
785 }
786 }
787
788 pub(crate) fn drop_old_schedule_data(&mut self, mut data: Box<ScheduleHeapData>) {
789 for n in data.removed_nodes.drain(..) {

Callers 1

clap_drop_orderingFunction · 0.45

Calls 2

containsMethod · 0.80
get_mutMethod · 0.45

Tested by

no test coverage detected