Skip to content

Commit 25baf7c

Browse files
authored
Merge pull request petgraph#233 from abreis/impl-from-edgeindex
Add missing impl to EdgeIndex
2 parents a77005b + 08fecc9 commit 25baf7c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/graph_impl/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ impl<Ix: IndexType> EdgeIndex<Ix>
158158
}
159159
}
160160

161+
impl<Ix: IndexType> From<Ix> for EdgeIndex<Ix> {
162+
fn from(ix: Ix) -> Self { EdgeIndex(ix) }
163+
}
164+
161165
impl<Ix: fmt::Debug> fmt::Debug for EdgeIndex<Ix>
162166
{
163167
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

0 commit comments

Comments
 (0)