message: Fix bug in order of iterative dfs
diff: @@ -86,7 +86,6 @@ impl<N, VM> Dfs<N, VM>
  /// the dfs from a particular node.
  pub fn move_to(&mut self, start: N)
  {
  - self.discovered.visit(start);
  self.stack.clear();
  self.stack.push(start);
  }
  @@ -95,15 +94,16 @@ impl<N, VM> Dfs<N, VM>
  pub fn next<G>(&mut self, graph: G) -> Option<N>
  where G: IntoNeighbors<NodeId=N>,
  {
  - if let Some(node) = self.stack.pop() {
  + while let Some(node) = self.stack.pop() {
  + if self.discovered.visit(node) {
  for succ in graph.neighbors(node) {
  - if self.discovered.visit(succ) {
  + if !self.discovered.is_visited(&succ) {
  self.stack.push(succ);
  }
  }
  -
  return Some(node);
  }
  + }
  None
  }
  }
  