From 5c71686b176324c6913e24757d7df2ec55a9ce38 Mon Sep 17 00:00:00 2001 From: szymon Date: Sun, 4 Oct 2026 14:21:08 +0200 Subject: [PATCH] docs: add example to uninit --- src/api/functions.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/api/functions.rs b/src/api/functions.rs index face787..edc5d17 100644 --- a/src/api/functions.rs +++ b/src/api/functions.rs @@ -54,6 +54,19 @@ where /// Uninitializes libnotify. /// /// This should be called when the program no longer needs libnotify for the rest of its lifecycle, typically just before exitting. +/// +/// # Example +/// ``` +/// use libnotify_rs::api::functions::{init, uninit}; +/// +/// fn main() -> Result<(), Box> { +/// init("Test app")?; +/// // let notify = ... +/// uninit(); // __always__ uninit libnotify after use +/// Ok(()) +/// } +/// +/// ``` pub fn uninit() { unsafe { notify_uninit();