Skip to content

Commit e434f9d

Browse files
committed
gpio: Move #[cfg(..)] to the impl
Avoid dupliaction where possible
1 parent d9259f9 commit e434f9d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nrf-hal-common/src/gpio.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,15 @@ pub enum Port {
4343
Port1,
4444
}
4545

46+
#[cfg(any(feature = "52833", feature = "52840"))]
4647
impl Port {
47-
#[cfg(any(feature = "52833", feature = "52840"))]
4848
pub(crate) fn bit(&self) -> bool {
4949
match self {
5050
Port::Port0 => false,
5151
Port::Port1 => true,
5252
}
5353
}
5454

55-
#[cfg(any(feature = "52833", feature = "52840"))]
5655
pub(crate) fn from_bit(bit: bool) -> Port {
5756
if bit {
5857
Port::Port1

0 commit comments

Comments
 (0)