mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 11:43:57 +01:00
Small typo fixes
This commit is contained in:
parent
914ddd40bb
commit
1188da84e3
3 changed files with 6 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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<Output = Result<Output<Self>, Self::Err>> + Send;
|
||||
|
||||
/// Send this request.
|
||||
|
|
Loading…
Reference in a new issue