commit | 08fecc9ee8c73f698af693f989aaca467330d73c | [log] [tgz] |
---|---|---|
author | Andre Braga Reis <andrebragareis@gmail.com> | Wed Nov 28 10:16:32 2018 +0000 |
committer | Andre Braga Reis <andrebragareis@gmail.com> | Tue Dec 04 22:46:32 2018 +0000 |
tree | 390283d08239aa5f1035d2c50f403caa3222b50c | |
parent | a248e8f248fe083dc280f952749933c15e8e7fe4 [diff] |
Add missing impl to EdgeIndex
diff --git a/src/graph_impl/mod.rs b/src/graph_impl/mod.rs index dbedd35..29dfb87 100644 --- a/src/graph_impl/mod.rs +++ b/src/graph_impl/mod.rs
@@ -158,6 +158,10 @@ } } +impl<Ix: IndexType> From<Ix> for EdgeIndex<Ix> { + fn from(ix: Ix) -> Self { EdgeIndex(ix) } +} + impl<Ix: fmt::Debug> fmt::Debug for EdgeIndex<Ix> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {