I'm too lazy to amend commits...
This commit is contained in:
Maybe Waffle 2022-09-23 18:40:54 +04:00
parent 0dc459ffcc
commit c96e46dc6c
6 changed files with 19 additions and 14 deletions

View file

@ -13,8 +13,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.parse::<i64>()?,
);
let bot = Bot::from_env()
.parse_mode(ParseMode::MarkdownV2);
let bot = Bot::from_env().parse_mode(ParseMode::MarkdownV2);
let Me { user: me, .. } = bot.get_me().await?;

View file

@ -5,13 +5,16 @@
//!
//! [`Requester`]: crate::requests::Requester
/// [`AutoSend`] bot adaptor which used to allow sending a request without calling
/// [`send`].
/// [`AutoSend`] bot adaptor which used to allow sending a request without
/// calling [`send`].
///
/// [`AutoSend`]: auto_send::AutoSend
/// [`send`]: crate::requests::Request::send
#[cfg(feature = "auto_send")]
#[deprecated(since = "0.8.0", note = "`AutoSend` is no longer required to `.await` requests and is now noop")]
#[deprecated(
since = "0.8.0",
note = "`AutoSend` is no longer required to `.await` requests and is now noop"
)]
pub mod auto_send;
/// [`CacheMe`] bot adaptor which caches [`GetMe`] requests.

View file

@ -1,5 +1,4 @@
use std::{pin::Pin, sync::Arc};
use std::future::IntoFuture;
use std::{future::IntoFuture, pin::Pin, sync::Arc};
use futures::{
future,

View file

@ -105,7 +105,8 @@ where
}
}
// FIXME: re-introduce `Either` impls once `Either: IntoFuture` (or make out own `Either`) (same for `Requester`)
// FIXME: re-introduce `Either` impls once `Either: IntoFuture` (or make out own
// `Either`) (same for `Requester`)
// impl<L, R> Request for Either<L, R>
// where

View file

@ -29,7 +29,10 @@ pub trait RequesterExt: Requester {
/// Send requests automatically, see [`AutoSend`] for more.
#[cfg(feature = "auto_send")]
#[deprecated(since = "0.8.0", note = "`AutoSend` is no longer required to `.await` requests and is now noop")]
#[deprecated(
since = "0.8.0",
note = "`AutoSend` is no longer required to `.await` requests and is now noop"
)]
#[allow(deprecated)]
fn auto_send(self) -> AutoSend<Self>
where