mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Fix compilation
This commit is contained in:
parent
a80a1215b2
commit
c82c57f0b1
3 changed files with 7 additions and 4 deletions
|
@ -1383,8 +1383,9 @@ impl Requester for Bot {
|
||||||
|
|
||||||
type SendGame = JsonRequest<payloads::SendGame>;
|
type SendGame = JsonRequest<payloads::SendGame>;
|
||||||
|
|
||||||
fn send_game<G>(&self, chat_id: ChatId, game_short_name: G) -> Self::SendGame
|
fn send_game<C, G>(&self, chat_id: C, game_short_name: G) -> Self::SendGame
|
||||||
where
|
where
|
||||||
|
C: Into<ChatId>,
|
||||||
G: Into<String>,
|
G: Into<String>,
|
||||||
{
|
{
|
||||||
Self::SendGame::new(self.clone(), payloads::SendGame::new(chat_id, game_short_name))
|
Self::SendGame::new(self.clone(), payloads::SendGame::new(chat_id, game_short_name))
|
||||||
|
|
|
@ -1406,9 +1406,10 @@ macro_rules! requester_forward {
|
||||||
(@method send_game $body:ident $ty:ident) => {
|
(@method send_game $body:ident $ty:ident) => {
|
||||||
type SendGame = $ty![SendGame];
|
type SendGame = $ty![SendGame];
|
||||||
|
|
||||||
fn send_game<G>(&self, chat_id: ChatId, game_short_name: G) -> Self::SendGame where G: Into<String> {
|
fn send_game<C, G>(&self, chat_id: C, game_short_name: G) -> Self::SendGame where C: Into<ChatId>,
|
||||||
|
G: Into<String> {
|
||||||
let this = self;
|
let this = self;
|
||||||
$body!(send_game this (chat_id: ChatId, game_short_name: G))
|
$body!(send_game this (chat_id: C, game_short_name: G))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
(@method set_game_score $body:ident $ty:ident) => {
|
(@method set_game_score $body:ident $ty:ident) => {
|
||||||
|
|
|
@ -1189,8 +1189,9 @@ pub trait Requester {
|
||||||
type SendGame: Request<Payload = SendGame, Err = Self::Err>;
|
type SendGame: Request<Payload = SendGame, Err = Self::Err>;
|
||||||
|
|
||||||
/// For Telegram documentation see [`SendGame`].
|
/// For Telegram documentation see [`SendGame`].
|
||||||
fn send_game<G>(&self, chat_id: ChatId, game_short_name: G) -> Self::SendGame
|
fn send_game<C, G>(&self, chat_id: C, game_short_name: G) -> Self::SendGame
|
||||||
where
|
where
|
||||||
|
C: Into<ChatId>,
|
||||||
G: Into<String>;
|
G: Into<String>;
|
||||||
|
|
||||||
type SetGameScore: Request<Payload = SetGameScore, Err = Self::Err>;
|
type SetGameScore: Request<Payload = SetGameScore, Err = Self::Err>;
|
||||||
|
|
Loading…
Reference in a new issue