Replace custom error type in favour of Debug constraints#10
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10 +/- ##
=======================================
Coverage 92.14% 92.14%
=======================================
Files 4 4
Lines 191 191
=======================================
Hits 176 176
Misses 15 15Continue to review full report at Codecov.
|
|
looks a lot cleaner than what I came up with. I think the linux traits may be able to fail, so at some point you may want to handle the errors. I use mostly stm32, so this works well for me. |
Yes this is true. My first attempt was to extend your error type so it could hold an SPI error and a GPIO error and then add Since this is effectively how it worked with the v1 traits I'm not too fussed. I've subscribed to that v3 issue and hopefully they come up with something that's a bit nice to use. |
@etrombly I came up with this to avoid the need for the error type. It seems the v1/v2 GPIO traits are a bit of a mess. There some discussion on the embedded-hal repo about a v3 that would address some of the issues like we're seeing here. Hopefully that will get sorted eventually and we can move to that.