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 @@ -5,6 +5,7 @@ use stm32f3xx_hal::gpio::{Output, PushPull};
5
5
use switch_hal:: { ActiveHigh , IntoSwitch , OutputSwitch , Switch } ;
6
6
7
7
use core:: slice:: Iter ;
8
+ use core:: iter:: FusedIterator ;
8
9
9
10
/// LED compass direction as noted on the board
10
11
#[ derive( Clone , Copy , Eq , PartialEq ) ]
@@ -223,6 +224,9 @@ impl<'a> ExactSizeIterator for LedsIterator<'a> {
223
224
}
224
225
}
225
226
227
+ ///Marker trait that indicates LedsIterator never starts returning Some after returning None
228
+ impl < ' a > FusedIterator for LedsIterator < ' a > { }
229
+
226
230
pub struct LedsMutIterator < ' a > {
227
231
current_index : usize ,
228
232
leds : & ' a mut Leds
@@ -276,3 +280,6 @@ impl<'a> ExactSizeIterator for LedsMutIterator<'a> {
276
280
ITERATOR_SIZE - self . current_index
277
281
}
278
282
}
283
+
284
+ ///Marker trait that indicates LedsMutIterator never starts returning Some after returning None
285
+ impl < ' a > FusedIterator for LedsMutIterator < ' a > { }
You can’t perform that action at this time.
0 commit comments