common/peripheral: do not require mut in PeripheralRef clone_unchecked.

This commit is contained in:
Dario Nieuwenhuis
2023-04-11 23:00:14 +02:00
parent 5c42ca13bd
commit 9a677ab618
11 changed files with 16 additions and 17 deletions

View File

@ -153,7 +153,7 @@ impl<'d, T: Instance, V: VbusDetect + 'd> driver::Driver<'d> for Driver<'d, T, V
}))
}
fn start(mut self, control_max_packet_size: u16) -> (Self::Bus, Self::ControlPipe) {
fn start(self, control_max_packet_size: u16) -> (Self::Bus, Self::ControlPipe) {
(
Bus {
_p: unsafe { self._p.clone_unchecked() },