Skip to content

Commit

Permalink
Properly document safety concerns
Browse files Browse the repository at this point in the history
  • Loading branch information
FenrirWolf committed Feb 24, 2024
1 parent c6d5cdc commit d32cd15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ctru-rs/src/applets/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ impl PopUp {
/// Sets a custom panic hook that uses the error applet to display panic messages. You can also choose to have
/// messages printed over stderr along with the pop-up display.
///
/// SAFETY: The error applet requires that both the [`Apt`] and [`Gfx`] services are active whenever it launches.
/// # Safety
///
/// The error applet requires that both the [`Apt`] and [`Gfx`] services are active whenever it launches.
/// By calling this function, you promise that you will keep those services alive until either the program ends or
/// you unregister this hook with [`std::panic::take_hook`](https://doc.rust-lang.org/std/panic/fn.take_hook.html).
pub unsafe fn set_panic_hook(use_stderr: bool) {
Expand Down

0 comments on commit d32cd15

Please sign in to comment.