rust-embedded / rust-i2cdev

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

replace try with ? #29

Closed dirvine closed 6 years ago

dirvine commented 7 years ago

Now this is available in stable.

posborne commented 7 years ago

Thanks, I'll probably hold off on merging as I want to continue to support rust versions going back a few for now (especially since 1.13.0 is broken on ARM: https://github.com/rust-lang/rust/issues/37630). I should probably add the oldest supported version to the .travis.yml to codify this design decision.

It's going to take me some time to get used to this new sugar...

We are also going to be moving the devices that are currently in this library out, so it is quite possible that I may have to close this PR when that is done as much of the code will be going away. I'll hold off until that time comes.

dirvine commented 7 years ago

No problem at all. I am looking to add some devices, but not sure the current published crate exposes I2CError. This was a 2 min PR so please do feel free to close it, it can be redone later. Beta-2 is Ok for arm atm, prior to that is a security issue AFAIK. Bit of a pain, but I suppose we are moving quickly here :-)