VersBinarii / bme280-rs

A platform agnostic Rust driver for the Bosch BM[PE]-280
Other
59 stars 73 forks source link

Implement `std::error::Error` for public `Error` struct #9

Closed nukemberg closed 2 years ago

nukemberg commented 3 years ago

Implementing the std::error::Error trait allows for error forwarding and interoperability with error handling libraries e.g. thiserror.

nukemberg commented 3 years ago

I see that since #![no_std] is used std::error::Error cannot be implemented. Is there any way to make this conditional? e.g. via features?

VersBinarii commented 2 years ago

There is a pull request https://github.com/VersBinarii/bme280-rs/pull/13 awaiting to address that. I will merge it as soon as its rebased. If there is no response from author i will apply that change manually over the weekend.

VersBinarii commented 2 years ago

Closing this with https://github.com/VersBinarii/bme280-rs/pull/17