From d32cd1525f2a2a5d34febdf91f6586e7f872cbce Mon Sep 17 00:00:00 2001 From: Fenrir Date: Fri, 23 Feb 2024 18:48:35 -0700 Subject: [PATCH] Properly document safety concerns --- ctru-rs/src/applets/error.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ctru-rs/src/applets/error.rs b/ctru-rs/src/applets/error.rs index 584a2b4..06e5ffe 100644 --- a/ctru-rs/src/applets/error.rs +++ b/ctru-rs/src/applets/error.rs @@ -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) {