message: FEAT: double ended and exact size traits for Graph iterators
  Add some simple missing trait implementations for graph's iterators.
  DoubleEndedIterator for NodeReferences
  ExactSizeIterator for NodeReferences, EdgeReferences, NodeIndices,
  EdgeIndices
diff: @@ -1840,6 +1840,8 @@ impl<Ix: IndexType> DoubleEndedIterator for NodeIndices<Ix> {
  }
  }
  +impl<Ix: IndexType> ExactSizeIterator for NodeIndices<Ix> {}
  +
  /// Iterator over the edge indices of a graph.
  #[derive(Clone, Debug)]
  pub struct EdgeIndices<Ix = DefaultIx> {
  @@ -1865,6 +1867,8 @@ impl<Ix: IndexType> DoubleEndedIterator for EdgeIndices<Ix> {
  }
  }
  +impl<Ix: IndexType> ExactSizeIterator for EdgeIndices<Ix> {}
  +
  /// Reference to a `Graph` edge.
  #[derive(Debug)]
  pub struct EdgeReference<'a, E: 'a, Ix = DefaultIx> {
  @@ -1923,6 +1927,20 @@ impl<'a, N, Ix> Iterator for NodeReferences<'a, N, Ix>
  }
  }
  +impl<'a, N, Ix> DoubleEndedIterator for NodeReferences<'a, N, Ix>
  + where Ix: IndexType
  +{
  + fn next_back(&mut self) -> Option<Self::Item> {
  + self.iter.next_back().map(|(i, node)|
  + (node_index(i), &node.weight)
  + )
  + }
  +}
  +
  +impl<'a, N, Ix> ExactSizeIterator for NodeReferences<'a, N, Ix>
  + where Ix: IndexType
  +{ }
  +
  impl<'a, Ix, E> EdgeReference<'a, E, Ix>
  where Ix: IndexType,
  {
  @@ -1986,6 +2004,10 @@ impl<'a, E, Ix> DoubleEndedIterator for EdgeReferences<'a, E, Ix>
  }
  }
  +impl<'a, E, Ix> ExactSizeIterator for EdgeReferences<'a, E, Ix>
  + where Ix: IndexType
  +{}
  +
  #[cfg(feature = "stable_graph")]
  pub mod stable_graph;
  mod frozen;
  