nrf-rs / nrf-hal

A Rust HAL for the nRF family of devices
Apache License 2.0
503 stars 139 forks source link

Add From impl for pins #364

Closed ZoeyR closed 2 years ago

ZoeyR commented 2 years ago

I ran into this when needing to take a generic struct that could contain any gpio pin. Since all the gpio pins have a degrade function I see no reason to not implement From. This allows generic code to work better.

ZoeyR commented 2 years ago

I think the build error is unrelated to my change since that's a dependency resolution issue and my code just adds a From impl.

jonas-schievink commented 2 years ago

Thanks! The CI issue should have been fixed by #365.

bors r+

ZoeyR commented 2 years ago

Awesome! Would you be able to cut a release after this? I can always pin to git but I've been trying to cut down on the amount of git dependencies in my Cargo.toml files.

bors[bot] commented 2 years ago

Build succeeded:

jonas-schievink commented 2 years ago

Sadly releases are pretty involved, so I'd like to get some more changes in before I publish one

ZoeyR commented 2 years ago

Understandable! I can pin to git for now. Thanks for merging so fast!