Small typo fixes

This commit is contained in:
Temirkhan Myrzamadi 2020-12-23 23:40:58 +06:00
parent 914ddd40bb
commit 1188da84e3
3 changed files with 6 additions and 7 deletions

View file

@ -3,7 +3,7 @@
//! Bot adaptors are very similar to the [`Iterator`] adaptors: they are bots //! Bot adaptors are very similar to the [`Iterator`] adaptors: they are bots
//! wrapping other bots to alter existing or add new functionality. //! 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()`. //! `.send()`.
//! //!
//! [`Requester`]: crate::requests::Requester //! [`Requester`]: crate::requests::Requester

View file

@ -8,7 +8,7 @@ use thiserror::Error;
/// An error caused by downloading a file. /// An error caused by downloading a file.
#[derive(Debug, Error, From)] #[derive(Debug, Error, From)]
pub enum DownloadError { 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}")] #[error("A network error: {0}")]
NetworkError(#[source] reqwest::Error), NetworkError(#[source] reqwest::Error),
@ -20,10 +20,10 @@ pub enum DownloadError {
/// An error caused by sending a request to Telegram. /// An error caused by sending a request to Telegram.
#[derive(Debug, Error)] #[derive(Debug, Error)]
pub enum RequestError { pub enum RequestError {
/// Telegram API error. /// A Telegram API error.
#[error("A Telegram's error #{status_code}: {kind:?}")] #[error("A Telegram's error #{status_code}: {kind:?}")]
ApiError { ApiError {
/// Kind of an API error. /// A kind of an API error.
kind: ApiError, kind: ApiError,
/// An HTTP code returned by Telegram, not very useful in practice. /// An HTTP code returned by Telegram, not very useful in practice.

View file

@ -31,9 +31,8 @@ pub trait Request: HasPayload {
/// A type of the future returned by the [`send_ref`](Request::send_ref) /// A type of the future returned by the [`send_ref`](Request::send_ref)
/// method. /// method.
/// // Note: it intentionally forbids borrowing from `self` though anyway we
/// Note: it intentionally forbids borrowing from `self` though anyway we // couldn't allow borrowing without GATs.
/// couldn't allow borrowing without GATs.
type SendRef: Future<Output = Result<Output<Self>, Self::Err>> + Send; type SendRef: Future<Output = Result<Output<Self>, Self::Err>> + Send;
/// Send this request. /// Send this request.