fn validate_structure(comp: &component::Component) -> Result<()> {
    let valid = comp.structure.edge_idx().all(|idx| {
        let edge = &comp.structure.get_edge(idx);
        edge.guard
            .as_ref()
            .map(|g| validate_guard(g))
            .unwrap_or(true)
            && edge.group.is_none()
    });
    if valid {
        Ok(())
    } else {
        Err(Error::MalformedStructure(
            "Groups / Holes can not be turned into Verilog".to_string(),
        ))
    }
}
/// Returns `Ok` if there are no groups defined.
Returns `Ok` if there are no groups defined.
Returns ` Ok ` if there are no groups defined .
fn validate_structure(comp: &component::Component) -> Result<()> {
    let valid = comp.structure.edge_idx().all(|idx| {
        let edge = &comp.structure.get_edge(idx);
        edge.guard
            .as_ref()
            .map(|g| validate_guard(g))
            .unwrap_or(true)
            && edge.group.is_none()
    });
    if valid {
        Ok(())
    } else {
        Err(Error::MalformedStructure(
            "Groups / Holes can not be turned into Verilog".to_string(),
        ))
    }
}
fn validate_structure ( comp : & component :: Component ) -> Result < ( ) > { let valid = comp . structure . edge_idx ( ) . all ( | idx | { let edge = & comp . structure . get_edge ( idx ) ; edge . guard . as_ref ( ) . map ( | g | validate_guard ( g ) ) . unwrap_or ( true ) && edge . group . is_none ( ) } ) ; if valid { Ok ( ( ) ) } else { Err ( Error :: MalformedStructure ( " " . to_string ( ) , ) ) } }
Returns `Ok` if there are no groups defined.
Returns ` Ok ` if there are no groups defined .
comp
&component::Component