nrf-rs / nrf-hal

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

Panic if Channel::channel() returns an invalid value. #439

Closed qwandor closed 3 months ago

qwandor commented 3 months ago

Channel isn't a sealed trait, so we can't assume that the implementation is correct. It's better to panic than have undefined behaviour.