impl Unborrow for &'a mut T
This plays nicer with user code that's generic over peripheral traits like `Instance` or `Pin`.
This commit is contained in:
@ -216,13 +216,6 @@ pub fn interrupt_declare(item: TokenStream) -> TokenStream {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl ::embassy::util::Unborrow for &mut #name_interrupt {
|
||||
type Target = #name_interrupt;
|
||||
unsafe fn unborrow(self) -> #name_interrupt {
|
||||
::core::ptr::read(self)
|
||||
}
|
||||
}
|
||||
};
|
||||
result.into()
|
||||
}
|
||||
|
Reference in New Issue
Block a user