From 76a10abc47b8024ceda85990d1e2351a8e2337e5 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Tue, 15 Oct 2019 13:27:41 +0600 Subject: [PATCH] Rename Request::ReturnValue to Request::Output --- src/requests/answer_pre_checkout_query.rs | 4 ++-- src/requests/answer_shipping_query.rs | 4 ++-- src/requests/edit_message_live_location.rs | 4 ++-- src/requests/forward_message.rs | 4 ++-- src/requests/get_chat.rs | 4 ++-- src/requests/get_file.rs | 4 ++-- src/requests/get_me.rs | 4 ++-- src/requests/get_updates.rs | 4 ++-- src/requests/get_user_profile_photos.rs | 4 ++-- src/requests/kick_chat_member.rs | 4 ++-- src/requests/mod.rs | 4 ++-- src/requests/pin_chat_message.rs | 4 ++-- src/requests/promote_chat_member.rs | 4 ++-- src/requests/restrict_chat_member.rs | 4 ++-- src/requests/send_animation.rs | 4 ++-- src/requests/send_audio.rs | 4 ++-- src/requests/send_chat_action.rs | 4 ++-- src/requests/send_contact.rs | 4 ++-- src/requests/send_document.rs | 4 ++-- src/requests/send_location.rs | 4 ++-- src/requests/send_media_group.rs | 4 ++-- src/requests/send_message.rs | 4 ++-- src/requests/send_photo.rs | 4 ++-- src/requests/send_poll.rs | 4 ++-- src/requests/send_venue.rs | 4 ++-- src/requests/send_video.rs | 4 ++-- src/requests/send_video_note.rs | 4 ++-- src/requests/send_voice.rs | 4 ++-- src/requests/stop_message_live_location.rs | 4 ++-- src/requests/unban_chat_member.rs | 4 ++-- src/requests/unpin_chat_message.rs | 4 ++-- 31 files changed, 62 insertions(+), 62 deletions(-) diff --git a/src/requests/answer_pre_checkout_query.rs b/src/requests/answer_pre_checkout_query.rs index df5940e7..b7f5bfe1 100644 --- a/src/requests/answer_pre_checkout_query.rs +++ b/src/requests/answer_pre_checkout_query.rs @@ -38,9 +38,9 @@ pub struct AnswerPreCheckoutQuery<'a> { #[async_trait] impl Request for AnswerPreCheckoutQuery<'_> { - type ReturnValue = True; + type Output = True; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/answer_shipping_query.rs b/src/requests/answer_shipping_query.rs index cb58135c..b7a25069 100644 --- a/src/requests/answer_shipping_query.rs +++ b/src/requests/answer_shipping_query.rs @@ -39,9 +39,9 @@ pub struct AnswerShippingQuery<'a> { #[async_trait] impl Request for AnswerShippingQuery<'_> { - type ReturnValue = True; + type Output = True; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/edit_message_live_location.rs b/src/requests/edit_message_live_location.rs index db584c28..c4c0fc4e 100644 --- a/src/requests/edit_message_live_location.rs +++ b/src/requests/edit_message_live_location.rs @@ -43,9 +43,9 @@ pub struct EditMessageLiveLocation<'a> { #[async_trait] impl Request for EditMessageLiveLocation<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/forward_message.rs b/src/requests/forward_message.rs index 6681faf0..9c16ae67 100644 --- a/src/requests/forward_message.rs +++ b/src/requests/forward_message.rs @@ -30,9 +30,9 @@ pub struct ForwardMessage<'a> { #[async_trait] impl Request for ForwardMessage<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/get_chat.rs b/src/requests/get_chat.rs index 9de16585..7135f226 100644 --- a/src/requests/get_chat.rs +++ b/src/requests/get_chat.rs @@ -21,9 +21,9 @@ pub struct GetChat<'a> { #[async_trait] impl Request for GetChat<'_> { - type ReturnValue = Chat; + type Output = Chat; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/get_file.rs b/src/requests/get_file.rs index bb303e92..59785b17 100644 --- a/src/requests/get_file.rs +++ b/src/requests/get_file.rs @@ -23,9 +23,9 @@ pub struct GetFile<'a> { #[async_trait] impl Request for GetFile<'_> { - type ReturnValue = File; + type Output = File; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/get_me.rs b/src/requests/get_me.rs index a33c0382..20cfa3ef 100644 --- a/src/requests/get_me.rs +++ b/src/requests/get_me.rs @@ -15,9 +15,9 @@ pub struct GetMe<'a> { #[async_trait] impl Request for GetMe<'_> { - type ReturnValue = User; + type Output = User; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/get_updates.rs b/src/requests/get_updates.rs index 5925c114..176a0e91 100644 --- a/src/requests/get_updates.rs +++ b/src/requests/get_updates.rs @@ -31,9 +31,9 @@ pub enum AllowedUpdate { #[async_trait] impl Request for GetUpdates<'_> { - type ReturnValue = Vec; + type Output = Vec; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/get_user_profile_photos.rs b/src/requests/get_user_profile_photos.rs index 37246478..6044441d 100644 --- a/src/requests/get_user_profile_photos.rs +++ b/src/requests/get_user_profile_photos.rs @@ -26,9 +26,9 @@ pub struct GetUserProfilePhotos<'a> { #[async_trait] impl Request for GetUserProfilePhotos<'_> { - type ReturnValue = UserProfilePhotos; + type Output = UserProfilePhotos; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/kick_chat_member.rs b/src/requests/kick_chat_member.rs index 08956d2a..9dec2cd6 100644 --- a/src/requests/kick_chat_member.rs +++ b/src/requests/kick_chat_member.rs @@ -29,9 +29,9 @@ pub struct KickChatMember<'a> { #[async_trait] impl Request for KickChatMember<'_> { - type ReturnValue = True; + type Output = True; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/mod.rs b/src/requests/mod.rs index f6708ca1..2a4d922c 100644 --- a/src/requests/mod.rs +++ b/src/requests/mod.rs @@ -65,10 +65,10 @@ pub type ResponseResult = Result; #[async_trait] pub trait Request { /// A type of response. - type ReturnValue: DeserializeOwned; + type Output: DeserializeOwned; /// Send this request. - async fn send_boxed(self) -> ResponseResult; + async fn send_boxed(self) -> ResponseResult; } #[derive(Debug, Clone)] diff --git a/src/requests/pin_chat_message.rs b/src/requests/pin_chat_message.rs index 4f71d4a6..9033e4dd 100644 --- a/src/requests/pin_chat_message.rs +++ b/src/requests/pin_chat_message.rs @@ -50,8 +50,8 @@ impl<'a> PinChatMessage<'a> { #[async_trait] impl Request for PinChatMessage<'_> { - type ReturnValue = True; - async fn send_boxed(self) -> ResponseResult { + type Output = True; + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/promote_chat_member.rs b/src/requests/promote_chat_member.rs index 596d56c6..d6c47d9d 100644 --- a/src/requests/promote_chat_member.rs +++ b/src/requests/promote_chat_member.rs @@ -52,9 +52,9 @@ pub struct PromoteChatMember<'a> { #[async_trait] impl Request for PromoteChatMember<'_> { - type ReturnValue = True; + type Output = True; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/restrict_chat_member.rs b/src/requests/restrict_chat_member.rs index 8720e0cc..5243484e 100644 --- a/src/requests/restrict_chat_member.rs +++ b/src/requests/restrict_chat_member.rs @@ -30,9 +30,9 @@ pub struct RestrictChatMember<'a> { #[async_trait] impl Request for RestrictChatMember<'_> { - type ReturnValue = True; + type Output = True; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_animation.rs b/src/requests/send_animation.rs index 6e24b063..96b08299 100644 --- a/src/requests/send_animation.rs +++ b/src/requests/send_animation.rs @@ -66,9 +66,9 @@ pub struct SendAnimation<'a> { #[async_trait] impl Request for SendAnimation<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_audio.rs b/src/requests/send_audio.rs index 8a9f0c9b..731f47ad 100644 --- a/src/requests/send_audio.rs +++ b/src/requests/send_audio.rs @@ -65,9 +65,9 @@ pub struct SendAudio<'a> { #[async_trait] impl Request for SendAudio<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_chat_action.rs b/src/requests/send_chat_action.rs index 7b9c8400..54e898bb 100644 --- a/src/requests/send_chat_action.rs +++ b/src/requests/send_chat_action.rs @@ -27,9 +27,9 @@ pub struct SendChatAction<'a> { #[async_trait] impl Request for SendChatAction<'_> { - type ReturnValue = True; + type Output = True; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_contact.rs b/src/requests/send_contact.rs index d93ee60f..307fb321 100644 --- a/src/requests/send_contact.rs +++ b/src/requests/send_contact.rs @@ -44,9 +44,9 @@ pub struct SendContact<'a> { #[async_trait] impl Request for SendContact<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_document.rs b/src/requests/send_document.rs index affe1a7a..298baa02 100644 --- a/src/requests/send_document.rs +++ b/src/requests/send_document.rs @@ -59,9 +59,9 @@ pub struct SendDocument<'a> { #[async_trait] impl Request for SendDocument<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_location.rs b/src/requests/send_location.rs index 4b4258fe..a37162b2 100644 --- a/src/requests/send_location.rs +++ b/src/requests/send_location.rs @@ -40,9 +40,9 @@ pub struct SendLocation<'a> { #[async_trait] impl Request for SendLocation<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_media_group.rs b/src/requests/send_media_group.rs index 1ed223c0..d189a926 100644 --- a/src/requests/send_media_group.rs +++ b/src/requests/send_media_group.rs @@ -22,9 +22,9 @@ pub struct SendMediaGroup<'a> { #[async_trait] impl Request for SendMediaGroup<'_> { - type ReturnValue = Vec; + type Output = Vec; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_message.rs b/src/requests/send_message.rs index cc416356..adca7c4f 100644 --- a/src/requests/send_message.rs +++ b/src/requests/send_message.rs @@ -45,9 +45,9 @@ pub struct SendMessage<'a> { #[async_trait] impl Request for SendMessage<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_photo.rs b/src/requests/send_photo.rs index 9bd77657..8092a55a 100644 --- a/src/requests/send_photo.rs +++ b/src/requests/send_photo.rs @@ -46,9 +46,9 @@ pub struct SendPhoto<'a> { #[async_trait] impl Request for SendPhoto<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_poll.rs b/src/requests/send_poll.rs index 02381a84..9d8466d3 100644 --- a/src/requests/send_poll.rs +++ b/src/requests/send_poll.rs @@ -34,9 +34,9 @@ pub struct SendPoll<'a> { #[async_trait] impl Request for SendPoll<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_venue.rs b/src/requests/send_venue.rs index 3913c24c..6fdd45e7 100644 --- a/src/requests/send_venue.rs +++ b/src/requests/send_venue.rs @@ -49,9 +49,9 @@ pub struct SendVenue<'a> { #[async_trait] impl Request for SendVenue<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_video.rs b/src/requests/send_video.rs index 811e7783..5d8d6696 100644 --- a/src/requests/send_video.rs +++ b/src/requests/send_video.rs @@ -68,9 +68,9 @@ pub struct SendVideo<'a> { #[async_trait] impl Request for SendVideo<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_video_note.rs b/src/requests/send_video_note.rs index 6e9a23a8..c824bfdf 100644 --- a/src/requests/send_video_note.rs +++ b/src/requests/send_video_note.rs @@ -55,9 +55,9 @@ pub struct SendVideoNote<'a> { #[async_trait] impl Request for SendVideoNote<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/send_voice.rs b/src/requests/send_voice.rs index d0d7ad27..75f139ea 100644 --- a/src/requests/send_voice.rs +++ b/src/requests/send_voice.rs @@ -52,9 +52,9 @@ pub struct SendVoice<'a> { #[async_trait] impl Request for SendVoice<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/stop_message_live_location.rs b/src/requests/stop_message_live_location.rs index e2c0282f..5455944e 100644 --- a/src/requests/stop_message_live_location.rs +++ b/src/requests/stop_message_live_location.rs @@ -34,9 +34,9 @@ pub struct StopMessageLiveLocation<'a> { #[async_trait] impl Request for StopMessageLiveLocation<'_> { - type ReturnValue = Message; + type Output = Message; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/unban_chat_member.rs b/src/requests/unban_chat_member.rs index 52ab1eaa..fb772d0d 100644 --- a/src/requests/unban_chat_member.rs +++ b/src/requests/unban_chat_member.rs @@ -23,9 +23,9 @@ pub struct UnbanChatMember<'a> { #[async_trait] impl Request for UnbanChatMember<'_> { - type ReturnValue = bool; + type Output = bool; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } } diff --git a/src/requests/unpin_chat_message.rs b/src/requests/unpin_chat_message.rs index 970e46e7..6bde53d0 100644 --- a/src/requests/unpin_chat_message.rs +++ b/src/requests/unpin_chat_message.rs @@ -16,9 +16,9 @@ pub struct UnpinChatMessage<'a> { #[async_trait] impl Request for UnpinChatMessage<'_> { - type ReturnValue = True; + type Output = True; - async fn send_boxed(self) -> ResponseResult { + async fn send_boxed(self) -> ResponseResult { self.send().await } }