Skip to content

Commit 4d53542

Browse files
committed
fixes
1 parent ca56b16 commit 4d53542

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

examples/analog-stopwatch-with-spi-ssd1306.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ fn draw_face() -> impl Iterator<Item = Pixel<BinaryColor>> {
352352
Circle::new(CENTER, SIZE * 2).into_styled(PrimitiveStyle::with_stroke(BinaryColor::On, 1));
353353

354354
// Create 12 `Line`s starting from the outer edge and drawing inwards by `tic_len` pixels
355-
let tics = (0..12).into_iter().map(move |index| {
355+
let tics = (0..12).map(move |index| {
356356
// Start angle around the circle, in radians
357357
let angle = START + (PI * 2.0 / 12.0) * index as f32;
358358

@@ -369,7 +369,7 @@ fn draw_face() -> impl Iterator<Item = Pixel<BinaryColor>> {
369369

370370
// Create a single iterator of pixels, first iterating over the circle, then over the 12 lines
371371
// generated
372-
face.pixels().into_iter().chain(tics.flatten())
372+
face.pixels().chain(tics.flatten())
373373
}
374374

375375
/// Draw the seconds hand given a seconds value (0 - 59)
@@ -395,9 +395,7 @@ fn draw_seconds_hand(seconds: u32) -> impl Iterator<Item = Pixel<BinaryColor>> {
395395
// Add a fancy circle near the end of the hand
396396
let decoration = Circle::new(decoration_position, 3).into_styled(decoration_style);
397397

398-
hand.pixels()
399-
.into_iter()
400-
.chain(decoration.pixels().into_iter())
398+
hand.pixels().chain(decoration.pixels().into_iter())
401399
}
402400

403401
#[exception]

0 commit comments

Comments
 (0)