pub fn nodeidx_from_name(name: &str, graph: &CatGraph) -> Option<NodeIndex> {
    for id in graph.node_indices() {
        if let Some(n) = graph.node_weight(id) {
            if n.name == name {
                return Some(id);
            }
        }
    }
    None
}
/// Helper function that should be an impl on CatGraph
/// Left public for tests
Helper function that should be an impl on CatGraph
Left public for tests
Helper function that should be an impl on CatGraph Left public for tests
pub fn nodeidx_from_name(name: &str, graph: &CatGraph) -> Option<NodeIndex> {
    for id in graph.node_indices() {
        if let Some(n) = graph.node_weight(id) {
            if n.name == name {
                return Some(id);
            }
        }
    }
    None
}
pub fn nodeidx_from_name ( name : & str , graph : & CatGraph ) -> Option < NodeIndex > { for id in graph . node_indices ( ) { if let Some ( n ) = graph . node_weight ( id ) { if n . name == name { return Some ( id ) ; } } } None }
Helper function that should be an impl on CatGraph
Left public for tests
Helper function that should be an impl on CatGraph Left public for tests
name
&str
graph
&CatGraph
name
&str
graph
&CatGraph