From 334ee73a40fed5af6f67691a66d73b0dcb1cdad2 Mon Sep 17 00:00:00 2001 From: nextel Date: Fri, 13 Sep 2019 14:03:12 +0300 Subject: [PATCH] cargo fmt --- src/core/requests/send_contact.rs | 45 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/core/requests/send_contact.rs b/src/core/requests/send_contact.rs index 99d997f0..26cb438c 100644 --- a/src/core/requests/send_contact.rs +++ b/src/core/requests/send_contact.rs @@ -1,8 +1,11 @@ use crate::core::network; -use crate::core::requests::{ChatId, Request, RequestContext, RequestFuture, ResponseResult}; +use crate::core::requests::{ + ChatId, Request, RequestContext, RequestFuture, ResponseResult, +}; use crate::core::types::{Message, ReplyMarkup}; -///Use this method to send phone contacts. On success, the sent Message is returned. +///Use this method to send phone contacts. On success, the sent Message is +/// returned. #[derive(Debug, Clone, Serialize)] struct SendContact<'a> { #[serde(skip_serializing)] @@ -37,7 +40,6 @@ struct SendContact<'a> { pub reply_markup: Option, } - impl<'a> Request<'a> for SendContact<'a> { type ReturnValue = Message; @@ -49,12 +51,11 @@ impl<'a> Request<'a> for SendContact<'a> { "sendContact", &self, ) - .await + .await }) } } - impl<'a> SendContact<'a> { pub(crate) fn new( ctx: RequestContext<'a>, @@ -76,66 +77,64 @@ impl<'a> SendContact<'a> { } pub fn chat_id(mut self, chat_id: T) -> Self - where - T: Into, + where + T: Into, { self.chat_id = chat_id.into(); self } pub fn phone_number(mut self, phone_number: T) -> Self - where - T: Into, + where + T: Into, { self.phone_number = phone_number.into(); self } pub fn first_name(mut self, first_name: T) -> Self - where - T: Into, + where + T: Into, { self.first_name = first_name.into(); self } pub fn last_name(mut self, last_name: T) -> Self - where - T: Into, + where + T: Into, { self.last_name = Some(last_name.into()); self } pub fn vcard(mut self, vcard: T) -> Self - where - T: Into, + where + T: Into, { self.vcard = Some(vcard.into()); self } pub fn disable_notification(mut self, disable_notification: T) -> Self - where - T: Into, + where + T: Into, { self.disable_notification = Some(disable_notification.into()); self } - pub fn reply_to_message_id(mut self, reply_to_message_id: T) -> Self - where - T: Into, + where + T: Into, { self.reply_to_message_id = Some(reply_to_message_id.into()); self } - pub fn reply_markup(mut self, reply_markup: T) -> Self - where - T: Into, + where + T: Into, { self.reply_markup = Some(reply_markup.into()); self