Skip to content

Commit 9543d18

Browse files
committed
avr-hal-generic: prefer compilation error for unsupported targets
The use of "unimplemented!" delays error detection until runtime, but the target architecture is known at compile time. By removing the unimplemented function we prevent unsupported architectures at compile-time.
1 parent 6fa0d2d commit 9543d18

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

avr-hal-generic/src/delay.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ fn busy_loop(mut c: u16) {
5757
}
5858
}
5959

60-
#[cfg(not(target_arch = "avr"))]
61-
fn busy_loop(_c: u16) {
62-
unimplemented!("Implementation is only available for avr targets!")
63-
}
64-
6560
// Clock-Specific Delay Implementations ----------------------------------- {{{
6661
impl delay_v0::DelayUs<u16> for Delay<crate::clock::MHz24> {
6762
fn delay_us(&mut self, mut us: u16) {

0 commit comments

Comments
 (0)