Skip to content

Commit

Permalink
HRTIM - Use non_exhaustive on EevInput to make its constructor private
Browse files Browse the repository at this point in the history
Co-authored-by: Zgarbul Andrey <[email protected]>
  • Loading branch information
usbalbin and burrbull authored Nov 16, 2024
1 parent 469b993 commit 6af8dcc
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/hrtim/external_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,22 @@ pub struct EevInputs {
impl EevInputs {
pub(crate) unsafe fn new() -> Self {
EevInputs {
eev_input1: EevInput { _x: PhantomData },
eev_input2: EevInput { _x: PhantomData },
eev_input3: EevInput { _x: PhantomData },
eev_input4: EevInput { _x: PhantomData },
eev_input5: EevInput { _x: PhantomData },
eev_input6: EevInput { _x: PhantomData },
eev_input7: EevInput { _x: PhantomData },
eev_input8: EevInput { _x: PhantomData },
eev_input9: EevInput { _x: PhantomData },
eev_input10: EevInput { _x: PhantomData },
eev_input1: EevInput,
eev_input2: EevInput,
eev_input3: EevInput,
eev_input4: EevInput,
eev_input5: EevInput,
eev_input6: EevInput,
eev_input7: EevInput,
eev_input8: EevInput,
eev_input9: EevInput,
eev_input10: EevInput,
}
}
}

pub struct EevInput<const N: u8> {
_x: PhantomData<()>,
}
#[non_exhaustive]
pub struct EevInput<const N: u8>;

/// This is implemented for types that can be used as inputs to the eev
/// # Safety
Expand Down

0 comments on commit 6af8dcc

Please sign in to comment.