fn find_transitive_dependency(
        &mut self,
        mut missing_dependency: Dependency<C>,
        sender: &I,
        time_received: Timestamp,
    ) -> Dependency<C> {
        // If `missing_dependency` is already downloaded and waiting for its dependency to be
        // resolved, we will follow that dependency until we find "the bottom" of the
        // chain – when there are no more known dependency requests scheduled,
        // and we request the last one in the chain.
        while let Some((next_missing, pvs)) = self
            .vertices_awaiting_deps
            .iter_mut()
            .find(|(_, pvs)| pvs.contains_dependency(&missing_dependency))
        {
            pvs.add_holder(&missing_dependency, sender.clone(), time_received);
            missing_dependency = next_missing.clone();
        }
        missing_dependency
    }
// Finds the highest missing dependency (i.e. one that we are waiting to be downloaded) and
// returns it, if any.
Finds the highest missing dependency  and
returns it, if any.
Finds the highest missing dependency and returns it if any .
fn find_transitive_dependency(
        &mut self,
        mut missing_dependency: Dependency<C>,
        sender: &I,
        time_received: Timestamp,
    ) -> Dependency<C> {
        // If `missing_dependency` is already downloaded and waiting for its dependency to be
        // resolved, we will follow that dependency until we find "the bottom" of the
        // chain – when there are no more known dependency requests scheduled,
        // and we request the last one in the chain.
        while let Some((next_missing, pvs)) = self
            .vertices_awaiting_deps
            .iter_mut()
            .find(|(_, pvs)| pvs.contains_dependency(&missing_dependency))
        {
            pvs.add_holder(&missing_dependency, sender.clone(), time_received);
            missing_dependency = next_missing.clone();
        }
        missing_dependency
    }
fn find_transitive_dependency ( & mut self , mut missing_dependency : Dependency < C > , sender : & I , time_received : Timestamp , ) -> Dependency < C > { // If `missing_dependency` is already downloaded and waiting for its dependency to be // resolved, we will follow that dependency until we find "the bottom" of the // chain – when there are no more known dependency requests scheduled, // and we request the last one in the chain. while let Some ( ( next_missing , pvs ) ) = self . vertices_awaiting_deps . iter_mut ( ) . find ( | ( _ , pvs ) | pvs . contains_dependency ( & missing_dependency ) ) { pvs . add_holder ( & missing_dependency , sender . clone ( ) , time_received ) ; missing_dependency = next_missing . clone ( ) ; } missing_dependency }
Finds the highest missing dependency (i.e.
Finds the highest missing dependency ( i . e .
&mut self
missing_dependency
Dependency<C>
sender
&I
time_received
Timestamp
&mut self
missing_dependency
Dependency<C>
sender
&I
time_received
Timestamp