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> {
176
176
177
177
impl < T > Iterator for IdxRange < T > {
178
178
type Item = Idx < T > ;
179
+
179
180
fn next ( & mut self ) -> Option < Self :: Item > {
180
181
self . range . next ( ) . map ( |raw| Idx :: from_raw ( raw. into ( ) ) )
181
182
}
183
+
184
+ fn size_hint ( & self ) -> ( usize , Option < usize > ) {
185
+ self . range . size_hint ( )
186
+ }
182
187
}
183
188
184
189
impl < T > DoubleEndedIterator for IdxRange < T > {
@@ -187,6 +192,8 @@ impl<T> DoubleEndedIterator for IdxRange<T> {
187
192
}
188
193
}
189
194
195
+ impl < T > ExactSizeIterator for IdxRange < T > { }
196
+
190
197
impl < T > fmt:: Debug for IdxRange < T > {
191
198
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
192
199
f. debug_tuple ( & format ! ( "IdxRange::<{}>" , std:: any:: type_name:: <T >( ) ) )
You can’t perform that action at this time.
0 commit comments