Skip to content

Commit

Permalink
fix: export all public structs
Browse files Browse the repository at this point in the history
  • Loading branch information
louib committed Mar 23, 2024
1 parent 3d2c863 commit f8d328d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -13,3 +13,6 @@ target/
# Added by cargo

/target

# Result directory created by Nix
/result
8 changes: 4 additions & 4 deletions src/nix.rs
Expand Up @@ -663,7 +663,7 @@ pub struct PackageNode {
}

impl PackageNode {
pub fn get_nodes_count(
pub fn get_reachable_nodes_count(
&self,
package_nodes: &BTreeMap<String, PackageNode>,
visited_children: &mut HashSet<String>,
Expand All @@ -683,7 +683,7 @@ impl PackageNode {
continue;
}
};
count += child_package.get_nodes_count(package_nodes, visited_children);
count += child_package.get_reachable_nodes_count(package_nodes, visited_children);
visited_children.insert(child_derivation_path.to_string());
}
count
Expand Down Expand Up @@ -907,7 +907,7 @@ impl PackageGraph {
let package_node = self.nodes.get(root_node).unwrap();
package_graph_stats.reachable_nodes_count.insert(
root_node.clone(),
package_node.get_nodes_count(&self.nodes, &mut visited_children),
package_node.get_reachable_nodes_count(&self.nodes, &mut visited_children),
);
}
package_graph_stats
Expand Down Expand Up @@ -985,7 +985,7 @@ fn add_visited_children(
// Small struct to make it easier to pretty-print the
// internal representation for the package graph.
#[derive(Debug)]
struct PrettyPrintLine {
pub struct PrettyPrintLine {
pub indent_level: usize,
pub line: String,
}
Expand Down

0 comments on commit f8d328d

Please sign in to comment.