jhelwig / unicorn-hat-hd-rs

Rust library for interacting with the Pimoroni Unicorn HAT HD
BSD 3-Clause "New" or "Revised" License
7 stars 7 forks source link

Code does not build on 1.48.0 #9

Open praetp opened 3 years ago

praetp commented 3 years ago

I am getting:

error[E0658]: use of unstable library feature 'array_methods'
   --> src/lib.rs:165:64
    |
165 |             Rotate::RotNone => arr.extend_from_slice(self.leds.as_slice()),
    |                                                                ^^^^^^^^
    |
    = note: see issue #76118 <https://github.com/rust-lang/rust/issues/76118> for more information

error[E0308]: mismatched types
   --> src/lib.rs:165:54
    |
165 |             Rotate::RotNone => arr.extend_from_slice(self.leds.as_slice()),
    |                                                      ^^^^^^^^^^^^^^^^^^^^ expected `u8`, found struct `RGB`
    |
    = note: expected reference `&[u8]`
               found reference `&[RGB<u8>]`

error: aborting due to 2 previous errors; 2 warnings emitted
BartMassey commented 3 years ago

See Pull Request #10 for a fix.