Simplify lifetimes in requests

(`impl<'a> ...<'a>` -> `impl ...<'_>`)
This commit is contained in:
Waffle 2019-09-28 15:36:03 +03:00
parent 37b84fd14c
commit 5f9f148bb6
17 changed files with 30 additions and 30 deletions

View file

@ -34,7 +34,7 @@ pub struct AnswerPreCheckoutQuery<'a> {
}
#[async_trait]
impl<'a> Request for AnswerPreCheckoutQuery<'a> {
impl Request for AnswerPreCheckoutQuery<'_> {
type ReturnValue = bool;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -42,7 +42,7 @@ impl<'a> Request for AnswerPreCheckoutQuery<'a> {
}
}
impl<'a> AnswerPreCheckoutQuery<'a> {
impl AnswerPreCheckoutQuery<'_> {
async fn send(self) -> ResponseResult<bool> {
network::request_json(
&self.ctx.client,

View file

@ -36,7 +36,7 @@ pub struct AnswerShippingQuery<'a> {
}
#[async_trait]
impl<'a> Request for AnswerShippingQuery<'a> {
impl Request for AnswerShippingQuery<'_> {
type ReturnValue = bool;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -44,7 +44,7 @@ impl<'a> Request for AnswerShippingQuery<'a> {
}
}
impl<'a> AnswerShippingQuery<'a> {
impl AnswerShippingQuery<'_> {
async fn send(self) -> ResponseResult<bool> {
network::request_json(
&self.ctx.client,

View file

@ -39,7 +39,7 @@ pub struct EditMessageLiveLocation<'a> {
}
#[async_trait]
impl<'a> Request for EditMessageLiveLocation<'a> {
impl Request for EditMessageLiveLocation<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -47,7 +47,7 @@ impl<'a> Request for EditMessageLiveLocation<'a> {
}
}
impl<'a> EditMessageLiveLocation<'a> {
impl EditMessageLiveLocation<'_> {
async fn send(self) -> ResponseResult<Message> {
network::request_json(
&self.ctx.client,

View file

@ -29,7 +29,7 @@ pub struct ForwardMessage<'a> {
}
#[async_trait]
impl<'a> Request for ForwardMessage<'a> {
impl Request for ForwardMessage<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -37,7 +37,7 @@ impl<'a> Request for ForwardMessage<'a> {
}
}
impl<'a> ForwardMessage<'a> {
impl ForwardMessage<'_> {
async fn send(self) -> ResponseResult<Message> {
network::request_json(
self.ctx.client,

View file

@ -20,7 +20,7 @@ pub struct GetChat<'a> {
}
#[async_trait]
impl<'a> Request for GetChat<'a> {
impl Request for GetChat<'_> {
type ReturnValue = Chat;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -28,7 +28,7 @@ impl<'a> Request for GetChat<'a> {
}
}
impl<'a> GetChat<'a> {
impl GetChat<'_> {
async fn send(self) -> ResponseResult<Chat> {
network::request_json(
&self.ctx.client,

View file

@ -14,7 +14,7 @@ pub struct GetMe<'a> {
}
#[async_trait]
impl<'a> Request for GetMe<'a> {
impl Request for GetMe<'_> {
type ReturnValue = User;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -22,7 +22,7 @@ impl<'a> Request for GetMe<'a> {
}
}
impl<'a> GetMe<'a> {
impl GetMe<'_> {
async fn send(self) -> ResponseResult<User> {
network::request_multipart(
self.ctx.client,

View file

@ -30,7 +30,7 @@ pub enum AllowedUpdate {
}
#[async_trait]
impl<'a> Request for GetUpdates<'a> {
impl Request for GetUpdates<'_> {
type ReturnValue = Vec<Update>;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {

View file

@ -62,7 +62,7 @@ pub struct SendAudio<'a> {
}
#[async_trait]
impl<'a> Request for SendAudio<'a> {
impl Request for SendAudio<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {

View file

@ -40,7 +40,7 @@ pub enum ChatAction {
}
#[async_trait]
impl<'a> Request for SendChatAction<'a> {
impl Request for SendChatAction<'_> {
type ReturnValue = bool;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -48,7 +48,7 @@ impl<'a> Request for SendChatAction<'a> {
}
}
impl<'a> SendChatAction<'a> {
impl SendChatAction<'_> {
async fn send(self) -> ResponseResult<bool> {
network::request_json(
&self.ctx.client,

View file

@ -43,7 +43,7 @@ pub struct SendContact<'a> {
}
#[async_trait]
impl<'a> Request for SendContact<'a> {
impl Request for SendContact<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -51,7 +51,7 @@ impl<'a> Request for SendContact<'a> {
}
}
impl<'a> SendContact<'a> {
impl SendContact<'_> {
async fn send(self) -> ResponseResult<Message> {
network::request_json(
&self.ctx.client,

View file

@ -39,7 +39,7 @@ pub struct SendLocation<'a> {
}
#[async_trait]
impl<'a> Request for SendLocation<'a> {
impl Request for SendLocation<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -47,7 +47,7 @@ impl<'a> Request for SendLocation<'a> {
}
}
impl<'a> SendLocation<'a> {
impl SendLocation<'_> {
async fn send(self) -> ResponseResult<Message> {
network::request_json(
&self.ctx.client,

View file

@ -23,7 +23,7 @@ pub struct SendMediaGroup<'a> {
}
#[async_trait]
impl<'a> Request for SendMediaGroup<'a> {
impl Request for SendMediaGroup<'_> {
type ReturnValue = Vec<Message>;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {

View file

@ -44,7 +44,7 @@ pub struct SendMessage<'a> {
}
#[async_trait]
impl<'a> Request for SendMessage<'a> {
impl Request for SendMessage<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -52,7 +52,7 @@ impl<'a> Request for SendMessage<'a> {
}
}
impl<'a> SendMessage<'a> {
impl SendMessage<'_> {
async fn send(self) -> ResponseResult<Message> {
network::request_json(
self.ctx.client,

View file

@ -46,7 +46,7 @@ pub struct SendPhoto<'a> {
}
#[async_trait]
impl<'a> Request for SendPhoto<'a> {
impl Request for SendPhoto<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {

View file

@ -33,7 +33,7 @@ pub struct SendPoll<'a> {
}
#[async_trait]
impl<'a> Request for SendPoll<'a> {
impl Request for SendPoll<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -41,7 +41,7 @@ impl<'a> Request for SendPoll<'a> {
}
}
impl<'a> SendPoll<'a> {
impl SendPoll<'_> {
async fn send(self) -> ResponseResult<Message> {
network::request_json(
&self.ctx.client,

View file

@ -48,7 +48,7 @@ pub struct SendVenue<'a> {
}
#[async_trait]
impl<'a> Request for SendVenue<'a> {
impl Request for SendVenue<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -56,7 +56,7 @@ impl<'a> Request for SendVenue<'a> {
}
}
impl<'a> SendVenue<'a> {
impl SendVenue<'_> {
async fn send(self) -> ResponseResult<Message> {
network::request_json(
&self.ctx.client,

View file

@ -33,7 +33,7 @@ pub struct StopMessageLiveLocation<'a> {
}
#[async_trait]
impl<'a> Request for StopMessageLiveLocation<'a> {
impl Request for StopMessageLiveLocation<'_> {
type ReturnValue = Message;
async fn send_boxed(self) -> ResponseResult<Self::ReturnValue> {
@ -41,7 +41,7 @@ impl<'a> Request for StopMessageLiveLocation<'a> {
}
}
impl<'a> StopMessageLiveLocation<'a> {
impl StopMessageLiveLocation<'_> {
async fn send(self) -> ResponseResult<Message> {
network::request_json(
&self.ctx.client,