fixed compilation errors

This commit is contained in:
P0lunin 2019-09-05 18:03:21 +03:00
parent dda98e7db8
commit 17a26aec7b
2 changed files with 5 additions and 5 deletions

View file

@ -18,7 +18,7 @@ struct ForwardMessage<'a> {
pub disable_notification: Option<bool>, pub disable_notification: Option<bool>,
} }
impl<'a> Request<'a> for ForwardMessage { impl<'a> Request<'a> for ForwardMessage<'a> {
type ReturnValue = Message; type ReturnValue = Message;
fn send(self) -> RequestFuture<'a, ResponseResult<Self::ReturnValue>> { fn send(self) -> RequestFuture<'a, ResponseResult<Self::ReturnValue>> {
@ -29,7 +29,7 @@ impl<'a> Request<'a> for ForwardMessage {
.add("message_id", &self.message_id) .add("message_id", &self.message_id)
.add_if_some( .add_if_some(
"disable_notification", "disable_notification",
&self.disable_notification.as_ref() self.disable_notification.as_ref()
) )
.build(); .build();
@ -43,8 +43,8 @@ impl<'a> Request<'a> for ForwardMessage {
} }
} }
impl ForwardMessage { impl<'a> ForwardMessage<'a> {
pub(crate) fn new(info: RequestContext, pub(crate) fn new(info: RequestContext<'a>,
chat_id: ChatId, chat_id: ChatId,
from_chat_id: ChatId, from_chat_id: ChatId,
message_id: i64) -> Self { message_id: i64) -> Self {

View file

@ -80,7 +80,7 @@ impl<'a> SendMessage<'a> {
self self
} }
pub fn parse_mode<T: Into<String>>(mut self, val: T) -> Self { pub fn parse_mode<T: Into<ParseMode>>(mut self, val: T) -> Self {
self.parse_mode = Some(val.into()); self.parse_mode = Some(val.into());
self self
} }