From 44d7461ea2f4d1aeafee43c042532ca18440cf30 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Thu, 29 Aug 2024 13:39:08 +0400 Subject: [PATCH] fix doctest --- src/client/response.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/response.rs b/src/client/response.rs index b69ea95..a273575 100644 --- a/src/client/response.rs +++ b/src/client/response.rs @@ -33,14 +33,17 @@ impl Response { /// /// # Examples /// ``` + /// # async fn req(client: tokio_gemini::Client) -> Result<(), tokio_gemini::LibError> { /// match client.request("gemini://dc09.ru").await?.ensure_ok() { - /// Ok(resp) => { + /// Ok(mut resp) => { /// println!("{}", resp.text().await?); /// } /// Err(resp) => { /// println!("{}", resp.message()); /// } /// } + /// # Ok(()) + /// # } /// ``` pub fn ensure_ok(self) -> Result { if self.status.reply_type() == ReplyType::Success {