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

@ -29,7 +29,7 @@ impl<'d, T: Pin> Flex<'d, T> {
}
#[inline]
pub fn degrade(mut self) -> Flex<'d, AnyPin> {
pub fn degrade(self) -> Flex<'d, AnyPin> {
// Safety: We are about to drop the other copy of this pin, so
// this clone is safe.
let pin = unsafe { self.pin.clone_unchecked() };