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 {