Skip to content

Commit 4f46907

Browse files
committed
non_exhaustive
1 parent d20c86c commit 4f46907

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/gpio.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,8 @@ macro_rules! gpio {
390390
$GPIOX::reset(rcc);
391391

392392
Parts {
393-
crl: Cr::<$port_id, false>(()),
394-
crh: Cr::<$port_id, true>(()),
393+
crl: Cr::<$port_id, false>,
394+
crh: Cr::<$port_id, true>,
395395
$(
396396
$pxi: $PXi::new(),
397397
)+
@@ -403,8 +403,8 @@ macro_rules! gpio {
403403
$GPIOX::enable(rcc);
404404

405405
Parts {
406-
crl: Cr::<$port_id, false>(()),
407-
crh: Cr::<$port_id, true>(()),
406+
crl: Cr::<$port_id, false>,
407+
crh: Cr::<$port_id, true>,
408408
$(
409409
$pxi: $PXi::new(),
410410
)+
@@ -627,7 +627,8 @@ impl<const P: char, const N: u8> Pin<P, N, Output<OpenDrain>> {
627627
}
628628

629629
/// Opaque CR register
630-
pub struct Cr<const P: char, const H: bool>(());
630+
#[non_exhaustive]
631+
pub struct Cr<const P: char, const H: bool>;
631632

632633
impl<const P: char, const N: u8, MODE> Pin<P, N, MODE>
633634
where

0 commit comments

Comments
 (0)