Skip to content

Commit

Permalink
safety
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Aug 9, 2023
1 parent a45ffcc commit be37b64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/generate/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ pub fn render(p_original: &Peripheral, index: &Index, config: &Config) -> Result
}

///Steal an instance of this peripheral
///
///# Safety
///
///Make sure that [`Peripherals::steal`] is already called
pub unsafe fn steal() -> Self {
Self { _marker: PhantomData }
}
Expand Down Expand Up @@ -157,6 +161,10 @@ pub fn render(p_original: &Peripheral, index: &Index, config: &Config) -> Result
}

///Steal an instance of this peripheral
///
///# Safety
///
///Make sure that [`Peripherals::steal`] is already called
pub unsafe fn steal() -> Self {
Self { _marker: PhantomData }
}
Expand Down

0 comments on commit be37b64

Please sign in to comment.