commit | 25baf7c3942a53d7bfe1d8d90317d8e94e2af714 | [log] [tgz] |
---|---|---|
author | bluss <bluss@users.noreply.github.com> | Wed Dec 05 17:21:56 2018 +0100 |
committer | GitHub <noreply@github.com> | Wed Dec 05 17:21:56 2018 +0100 |
tree | 179af79539c7abee807dfae896b0b7d702431750 | |
parent | a77005b7ed944d59ff69f1b538cd99b3c325cdc2 [diff] | |
parent | 08fecc9ee8c73f698af693f989aaca467330d73c [diff] |
Merge pull request #233 from abreis/impl-from-edgeindex 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 {