From 1188da84e325283ea96e25e39fa0ad3808fef5b3 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Wed, 23 Dec 2020 23:40:58 +0600 Subject: [PATCH] Small typo fixes --- src/adaptors.rs | 2 +- src/errors.rs | 6 +++--- src/requests/request.rs | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/adaptors.rs b/src/adaptors.rs index fc4c6583..51db702c 100644 --- a/src/adaptors.rs +++ b/src/adaptors.rs @@ -3,7 +3,7 @@ //! Bot adaptors are very similar to the [`Iterator`] adaptors: they are bots //! wrapping other bots to alter existing or add new functionality. //! -//! E.g. [`AutoSend`] allows `await`ing requests directly, no need to to use +//! E.g. [`AutoSend`] allows `await`ing requests directly, no need to use //! `.send()`. //! //! [`Requester`]: crate::requests::Requester diff --git a/src/errors.rs b/src/errors.rs index 1b183180..9c65dd6d 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -8,7 +8,7 @@ use thiserror::Error; /// An error caused by downloading a file. #[derive(Debug, Error, From)] pub enum DownloadError { - /// Network error while downloading a file from Telegram. + /// A network error while downloading a file from Telegram. #[error("A network error: {0}")] NetworkError(#[source] reqwest::Error), @@ -20,10 +20,10 @@ pub enum DownloadError { /// An error caused by sending a request to Telegram. #[derive(Debug, Error)] pub enum RequestError { - /// Telegram API error. + /// A Telegram API error. #[error("A Telegram's error #{status_code}: {kind:?}")] ApiError { - /// Kind of an API error. + /// A kind of an API error. kind: ApiError, /// An HTTP code returned by Telegram, not very useful in practice. diff --git a/src/requests/request.rs b/src/requests/request.rs index b3f674f3..36f97976 100644 --- a/src/requests/request.rs +++ b/src/requests/request.rs @@ -31,9 +31,8 @@ pub trait Request: HasPayload { /// A type of the future returned by the [`send_ref`](Request::send_ref) /// method. - /// - /// Note: it intentionally forbids borrowing from `self` though anyway we - /// couldn't allow borrowing without GATs. + // Note: it intentionally forbids borrowing from `self` though anyway we + // couldn't allow borrowing without GATs. type SendRef: Future, Self::Err>> + Send; /// Send this request.