Browse Source

Cargo-fmt fixes

pull/3/head
Morgan Phillips 8 years ago
parent
commit
bdab73b0c7
  1. 5
      src/libcretonne/cfg.rs

5
src/libcretonne/cfg.rs

@ -45,7 +45,7 @@ pub struct CFGNode {
impl CFGNode {
/// CFG Node successors stripped of loop edges.
pub fn children(&self) -> Vec<Ebb> {
let pred_ebbs = self.predecessors.iter().map(|&(ebb, _)| { ebb }).collect();
let pred_ebbs = self.predecessors.iter().map(|&(ebb, _)| ebb).collect();
let children = self.successors.difference(&pred_ebbs).cloned().collect();
children
}
@ -296,6 +296,7 @@ mod tests {
func.layout.append_inst(jmp_ebb2_ebb5, ebb2);
let cfg = ControlFlowGraph::new(&func);
assert_eq!(cfg.postorder_ebbs(), vec![ebb0, ebb2, ebb5, ebb4, ebb1, ebb3]);
assert_eq!(cfg.postorder_ebbs(),
vec![ebb0, ebb2, ebb5, ebb4, ebb1, ebb3]);
}
}

Loading…
Cancel
Save