Skip to content

Commit 6af8dcc

Browse files
usbalbinburrbull
andauthored
HRTIM - Use non_exhaustive on EevInput to make its constructor private
Co-authored-by: Zgarbul Andrey <[email protected]>
1 parent 469b993 commit 6af8dcc

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/hrtim/external_event.rs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,22 @@ pub struct EevInputs {
3030
impl EevInputs {
3131
pub(crate) unsafe fn new() -> Self {
3232
EevInputs {
33-
eev_input1: EevInput { _x: PhantomData },
34-
eev_input2: EevInput { _x: PhantomData },
35-
eev_input3: EevInput { _x: PhantomData },
36-
eev_input4: EevInput { _x: PhantomData },
37-
eev_input5: EevInput { _x: PhantomData },
38-
eev_input6: EevInput { _x: PhantomData },
39-
eev_input7: EevInput { _x: PhantomData },
40-
eev_input8: EevInput { _x: PhantomData },
41-
eev_input9: EevInput { _x: PhantomData },
42-
eev_input10: EevInput { _x: PhantomData },
33+
eev_input1: EevInput,
34+
eev_input2: EevInput,
35+
eev_input3: EevInput,
36+
eev_input4: EevInput,
37+
eev_input5: EevInput,
38+
eev_input6: EevInput,
39+
eev_input7: EevInput,
40+
eev_input8: EevInput,
41+
eev_input9: EevInput,
42+
eev_input10: EevInput,
4343
}
4444
}
4545
}
4646

47-
pub struct EevInput<const N: u8> {
48-
_x: PhantomData<()>,
49-
}
47+
#[non_exhaustive]
48+
pub struct EevInput<const N: u8>;
5049

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

0 commit comments

Comments
 (0)