File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,6 +125,12 @@ impl<Ix: IndexType> NodeIndex<Ix> {
125125 }
126126}
127127
128+ impl < Ix : fmt:: Display > fmt:: Display for NodeIndex < Ix > {
129+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
130+ write ! ( f, "NodeIndex({})" , self . 0 )
131+ }
132+ }
133+
128134unsafe impl < Ix : IndexType > IndexType for NodeIndex < Ix > {
129135 fn index ( & self ) -> usize {
130136 self . 0 . index ( )
@@ -192,6 +198,12 @@ impl<Ix: IndexType> From<Ix> for EdgeIndex<Ix> {
192198 }
193199}
194200
201+ impl < Ix : fmt:: Display > fmt:: Display for EdgeIndex < Ix > {
202+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
203+ write ! ( f, "EdgeIndex({})" , self . 0 )
204+ }
205+ }
206+
195207impl < Ix : fmt:: Debug > fmt:: Debug for EdgeIndex < Ix > {
196208 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
197209 write ! ( f, "EdgeIndex({:?})" , self . 0 )
You can’t perform that action at this time.
0 commit comments