fn unreachable_rules(
    &self,
    full_dependency_edges: &RuleDependencyEdges,
  ) -> Vec<UnreachableError> {
    // Walk the graph, starting from root entries.
    let mut entry_stack: Vec<_> = full_dependency_edges
      .keys()
      .filter(|entry| match entry {
        &EntryWithDeps::Root(_) => true,
        _ => false,
      })
      .collect();
    let mut visited = HashSet::new();
    while let Some(entry) = entry_stack.pop() {
      if visited.contains(&entry) {
        continue;
      }
      visited.insert(entry);

      if let Some(edges) = full_dependency_edges.get(entry) {
        entry_stack.extend(edges.all_dependencies().filter_map(|e| match e {
          &Entry::WithDeps(ref e) => Some(e),
          _ => None,
        }));
      }
    }

    let reachable_rules: HashSet<_> = visited
      .into_iter()
      .filter_map(|entry| match entry {
        &EntryWithDeps::Inner(InnerEntry {
          rule: Rule::Task(ref task_rule),
          ..
        }) => Some(task_rule.clone()),
        _ => None,
      })
      .collect();

    self
      .tasks
      .all_tasks()
      .iter()
      .filter(|r| !reachable_rules.contains(r))
      .map(|&r| UnreachableError::new(r.clone()))
      .collect()
  }
///
/// Compute input TaskRules that are unreachable from root entries.
///
Compute input TaskRules that are unreachable from root entries.
Compute input TaskRules that are unreachable from root entries .
fn unreachable_rules(
    &self,
    full_dependency_edges: &RuleDependencyEdges,
  ) -> Vec<UnreachableError> {
    // Walk the graph, starting from root entries.
    let mut entry_stack: Vec<_> = full_dependency_edges
      .keys()
      .filter(|entry| match entry {
        &EntryWithDeps::Root(_) => true,
        _ => false,
      })
      .collect();
    let mut visited = HashSet::new();
    while let Some(entry) = entry_stack.pop() {
      if visited.contains(&entry) {
        continue;
      }
      visited.insert(entry);
      if let Some(edges) = full_dependency_edges.get(entry) {
        entry_stack.extend(edges.all_dependencies().filter_map(|e| match e {
          &Entry::WithDeps(ref e) => Some(e),
          _ => None,
        }));
      }
    }
    let reachable_rules: HashSet<_> = visited
      .into_iter()
      .filter_map(|entry| match entry {
        &EntryWithDeps::Inner(InnerEntry {
          rule: Rule::Task(ref task_rule),
          ..
        }) => Some(task_rule.clone()),
        _ => None,
      })
      .collect();
    self
      .tasks
      .all_tasks()
      .iter()
      .filter(|r| !reachable_rules.contains(r))
      .map(|&r| UnreachableError::new(r.clone()))
      .collect()
  }
fn unreachable_rules ( & self , full_dependency_edges : & RuleDependencyEdges , ) -> Vec < UnreachableError > { // Walk the graph, starting from root entries. let mut entry_stack : Vec < _ > = full_dependency_edges . keys ( ) . filter ( | entry | match entry { & EntryWithDeps :: Root ( _ ) => true , _ => false , } ) . collect ( ) ; let mut visited = HashSet :: new ( ) ; while let Some ( entry ) = entry_stack . pop ( ) { if visited . contains ( & entry ) { continue ; } visited . insert ( entry ) ; if let Some ( edges ) = full_dependency_edges . get ( entry ) { entry_stack . extend ( edges . all_dependencies ( ) . filter_map ( | e | match e { & Entry :: WithDeps ( ref e ) => Some ( e ) , _ => None , } ) ) ; } } let reachable_rules : HashSet < _ > = visited . into_iter ( ) . filter_map ( | entry | match entry { & EntryWithDeps :: Inner ( InnerEntry { rule : Rule :: Task ( ref task_rule ) , .. } ) => Some ( task_rule . clone ( ) ) , _ => None , } ) . collect ( ) ; self . tasks . all_tasks ( ) . iter ( ) . filter ( | r | ! reachable_rules . contains ( r ) ) . map ( | & r | UnreachableError :: new ( r . clone ( ) ) ) . collect ( ) }
Compute input TaskRules that are unreachable from root entries.
Compute input TaskRules that are unreachable from root entries .
&self
full_dependency_edges
&RuleDependencyEdges
&self
full_dependency_edges
&RuleDependencyEdges