rust-embedded / rust-i2cdev

Rust library for interfacing with i2c devices under Linux
Apache License 2.0
205 stars 53 forks source link

Make compatible with Rust 1.31.0 and prepare patch release #55

Closed eldruin closed 4 years ago

eldruin commented 4 years ago

Version 0.4.3 produces an error on Rust 1.31.0 which I usually take as MSRV in device drivers. Sorry about that! This solves it and bumps the patch version. AFAIK it is not possible to send tags in a PR so somebody needs to take it from here.

error[E0502]: cannot borrow `*data` as immutable because it is also borrowed as mutable

  --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/i2cdev-0.4.3/src/mock.rs:41:75
   |
41 |         data.clone_from_slice(&self.registers[self.offset..(self.offset + data.len())]);
   |         ----                                                              ^^^^        - mutable borrow ends here
   |         |                                                                 |
   |         mutable borrow occurs here                                        immutable borrow occurs here

See the error on CI here

rust-highfive commented 4 years ago

r? @ryankurte

(rust_highfive has picked a reviewer for you, use r? to override)

posborne commented 4 years ago

0.4.4 tagged and published to crates.io