From c8dd5c42e959d439a36552e3e2085fde6bc1c4e6 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 3 Nov 2022 15:34:16 +0100 Subject: [PATCH] docs(sdk): Add more doc links to as_ruma_api_error methods --- crates/matrix-sdk/src/error.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/matrix-sdk/src/error.rs b/crates/matrix-sdk/src/error.rs index 328c88cb3..7371a22cb 100644 --- a/crates/matrix-sdk/src/error.rs +++ b/crates/matrix-sdk/src/error.rs @@ -118,7 +118,9 @@ pub enum HttpError { #[rustfmt::skip] // stop rustfmt breaking the `` in docs across multiple lines impl HttpError { - /// If `self` is `Api(Server(Known(e)))`, returns `Some(e)`. + /// If `self` is + /// [Api](Self::Api)([Server](FromHttpResponseError::Server)([Known](ServerError::Known)(e))), + /// returns `Some(e)`. /// /// Otherwise, returns `None`. pub fn as_ruma_api_error(&self) -> Option<&RumaApiError> { @@ -227,7 +229,9 @@ pub enum Error { #[rustfmt::skip] // stop rustfmt breaking the `` in docs across multiple lines impl Error { - /// If `self` is `Http(Api(Server(Known(e))))`, returns `Some(e)`. + /// If `self` is + /// [Http](Self::Http)([Api](HttpError::Api)([Server](FromHttpResponseError::Server)([Known](ServerError::Known)(e)))), + /// returns `Some(e)`. /// /// Otherwise, returns `None`. pub fn as_ruma_api_error(&self) -> Option<&RumaApiError> {