message: Moved index_twice_mut further down in StableGraph impl
diff: @@ -179,28 +179,6 @@ impl<N, E, Ty, Ix> StableGraph<N, E, Ty, Ix>
  }
  }
  - /// Index the `Graph` by two indices, any combination of
  - /// node or edge indices is fine.
  - ///
  - /// **Panics** if the indices are equal or if they are out of bounds.
  - pub fn index_twice_mut<T, U>(&mut self, i: T, j: U)
  - -> (&mut <Self as Index<T>>::Output,
  - &mut <Self as Index<U>>::Output)
  - where Self: IndexMut<T> + IndexMut<U>,
  - T: GraphIndex,
  - U: GraphIndex,
  - {
  - assert!(T::is_node_index() != U::is_node_index() ||
  - i.index() != j.index());
  -
  - // Allow two mutable indexes here -- they are nonoverlapping
  - unsafe {
  - let self_mut = self as *mut _;
  - (<Self as IndexMut<T>>::index_mut(&mut *self_mut, i),
  - <Self as IndexMut<U>>::index_mut(&mut *self_mut, j))
  - }
  - }
  -
  /// Return the current node and edge capacity of the graph.
  pub fn capacity(&self) -> (usize, usize) {
  self.g.capacity()
  @@ -589,6 +567,28 @@ impl<N, E, Ty, Ix> StableGraph<N, E, Ty, Ix>
  }
  }
  + /// Index the `Graph` by two indices, any combination of
  + /// node or edge indices is fine.
  + ///
  + /// **Panics** if the indices are equal or if they are out of bounds.
  + pub fn index_twice_mut<T, U>(&mut self, i: T, j: U)
  + -> (&mut <Self as Index<T>>::Output,
  + &mut <Self as Index<U>>::Output)
  + where Self: IndexMut<T> + IndexMut<U>,
  + T: GraphIndex,
  + U: GraphIndex,
  + {
  + assert!(T::is_node_index() != U::is_node_index() ||
  + i.index() != j.index());
  +
  + // Allow two mutable indexes here -- they are nonoverlapping
  + unsafe {
  + let self_mut = self as *mut _;
  + (<Self as IndexMut<T>>::index_mut(&mut *self_mut, i),
  + <Self as IndexMut<U>>::index_mut(&mut *self_mut, j))
  + }
  + }
  +
  /// Create a new `StableGraph` from an iterable of edges.
  ///
  /// Node weights `N` are set to default values.
  