Reuse unsafe_impl_unborrow in other macros.

This commit is contained in:
Dario Nieuwenhuis
2022-07-22 15:21:35 +02:00
parent bff0ad9286
commit 715fa51468
2 changed files with 2 additions and 19 deletions

View File

@ -21,16 +21,7 @@ macro_rules! peripherals {
}
$(#[$cfg])?
unsafe impl $crate::Unborrow for $name {
type Target = $name;
#[inline]
fn unborrow<'a>(self) -> $crate::Unborrowed<'a, Self::Target>
where
Self: 'a,
{
$crate::Unborrowed::new(self)
}
}
$crate::unsafe_impl_unborrow!($name);
)*
}