Skip to content

Commit

Permalink
Phantom data should not need mut
Browse files Browse the repository at this point in the history
  • Loading branch information
ptpaterson committed Jan 27, 2024
1 parent 41dfd0e commit a2d71b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions esp-hal-common/src/twai/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ impl BaudRate {

/// An inactive TWAI peripheral in the "Reset"/configuration state.
pub struct TwaiConfiguration<'d, T> {
peripheral: PhantomData<&'d mut PeripheralRef<'d, T>>,
peripheral: PhantomData<&'d PeripheralRef<'d, T>>,
}

impl<'d, T> TwaiConfiguration<'d, T>
Expand Down Expand Up @@ -480,7 +480,7 @@ where

/// Interface to the CAN transmitter part.
pub struct TwaiTx<'d, T> {
_peripheral: PhantomData<&'d mut T>,
_peripheral: PhantomData<&'d T>,
}

impl<'d, T> TwaiTx<'d, T>
Expand Down Expand Up @@ -520,7 +520,7 @@ where

/// Interface to the CAN receiver part.
pub struct TwaiRx<'d, T> {
_peripheral: PhantomData<&'d mut T>,
_peripheral: PhantomData<&'d T>,
}

impl<'d, T> TwaiRx<'d, T>
Expand Down

0 comments on commit a2d71b5

Please sign in to comment.