From fdbf3326153c2aa17d9187d082c5096d616763e3 Mon Sep 17 00:00:00 2001 From: szymon Date: Sun, 4 Oct 2026 15:03:43 +0200 Subject: [PATCH] docs: add doctest to notification::update --- src/api/notification.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/api/notification.rs b/src/api/notification.rs index b0f94ce..37cd24c 100644 --- a/src/api/notification.rs +++ b/src/api/notification.rs @@ -472,6 +472,19 @@ impl<'a> Notification { /// /// # Errors /// This function can return LibnotifyError::{NulError} + /// + /// # Example + /// ``` + /// use libnotify_rs::api::{functions::init, notification::Notification}; + /// + /// fn main() -> Result<(), Box> { + /// init("Test app")?; + /// let mut notification = Notification::new("My notification", "Yap yap", None)?; + /// notification.update("My new summary", "My new body", None)?; + /// + /// Ok(()) + /// } + /// ``` pub fn update<'b, F, I>( &mut self, summary: &str,