Skip to main content

find_dead_nodes

Function find_dead_nodes 

Source
pub fn find_dead_nodes(
    imports: &HashMap<String, HashSet<String>>,
) -> Vec<String>
Expand description

Find nodes with no inbound edges (nothing imports/calls them) that do have outbound edges (they import/call something). These are unreachable internal nodes — potential dead code. Entry points (main.rs, lib.rs) are included; callers can filter based on their heuristics.