File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -176,9 +176,14 @@ impl<T> IdxRange<T> {
176176
177177impl < T > Iterator for IdxRange < T > {
178178 type Item = Idx < T > ;
179+
179180 fn next ( & mut self ) -> Option < Self :: Item > {
180181 self . range . next ( ) . map ( |raw| Idx :: from_raw ( raw. into ( ) ) )
181182 }
183+
184+ fn size_hint ( & self ) -> ( usize , Option < usize > ) {
185+ self . range . size_hint ( )
186+ }
182187}
183188
184189impl < T > DoubleEndedIterator for IdxRange < T > {
@@ -187,6 +192,8 @@ impl<T> DoubleEndedIterator for IdxRange<T> {
187192 }
188193}
189194
195+ impl < T > ExactSizeIterator for IdxRange < T > { }
196+
190197impl < T > fmt:: Debug for IdxRange < T > {
191198 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
192199 f. debug_tuple ( & format ! ( "IdxRange::<{}>" , std:: any:: type_name:: <T >( ) ) )
You can’t perform that action at this time.
0 commit comments