embedded-hal icon indicating copy to clipboard operation
embedded-hal copied to clipboard

TryInto instead of Into

Open burrbull opened this issue 4 years ago • 1 comments
trafficstars

https://github.com/rust-embedded/embedded-hal/blob/3dcb672bfcff83d8e672ae41cd203a9c6a9c8b4c/src/nb/timer.rs#L69

During moving to embedded-time I found Into<Hertz> is not implemented for Kilo/Megahertz

burrbull avatar Aug 15 '21 09:08 burrbull

hey thanks for the issue, where is the Hertz type from? i might not have the full picture but, it seems like that'd be a missing conversion in embedded-time (or the HAL you're using) rather than here, and that a compiler error is better than a runtime one for this situation?

ryankurte avatar Aug 15 '21 22:08 ryankurte