Apply x clippy --fix and x fmt
This commit is contained in:
parent
f2e1a3a80a
commit
dabd05bbab
14 changed files with 28 additions and 30 deletions
|
@ -93,7 +93,7 @@ fn dominators_impl<G: ControlFlowGraph>(graph: &G) -> Inner<G::Node> {
|
|||
// These are all done here rather than through one of the 'standard'
|
||||
// graph traversals to help make this fast.
|
||||
'recurse: while let Some(frame) = stack.last_mut() {
|
||||
while let Some(successor) = frame.iter.next() {
|
||||
for successor in frame.iter.by_ref() {
|
||||
if real_to_pre_order[successor].is_none() {
|
||||
let pre_order_idx = pre_order_to_real.push(successor);
|
||||
real_to_pre_order[successor] = Some(pre_order_idx);
|
||||
|
|
|
@ -48,7 +48,7 @@ fn post_order_walk<G: DirectedGraph + Successors>(
|
|||
let node = frame.node;
|
||||
visited[node] = true;
|
||||
|
||||
while let Some(successor) = frame.iter.next() {
|
||||
for successor in frame.iter.by_ref() {
|
||||
if !visited[successor] {
|
||||
stack.push(PostOrderFrame { node: successor, iter: graph.successors(successor) });
|
||||
continue 'recurse;
|
||||
|
@ -112,7 +112,7 @@ where
|
|||
/// This is equivalent to just invoke `next` repeatedly until
|
||||
/// you get a `None` result.
|
||||
pub fn complete_search(&mut self) {
|
||||
while let Some(_) = self.next() {}
|
||||
for _ in self.by_ref() {}
|
||||
}
|
||||
|
||||
/// Returns true if node has been visited thus far.
|
||||
|
|
|
@ -40,7 +40,7 @@ pub struct SccData<S: Idx> {
|
|||
}
|
||||
|
||||
impl<N: Idx, S: Idx + Ord> Sccs<N, S> {
|
||||
pub fn new(graph: &(impl DirectedGraph<Node = N> + Successors)) -> Self {
|
||||
pub fn new(graph: &impl Successors<Node = N>) -> Self {
|
||||
SccsConstruction::construct(graph)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue