This commit is contained in:
Temirkhan Myrzamadi 2020-07-27 18:14:20 +06:00
parent ed3e418426
commit b450bc09f5

View file

@ -38,12 +38,16 @@ impl InlineQuery {
Self { id: id.into(), from, location: None, query: query.into(), offset: offset.into() } Self { id: id.into(), from, location: None, query: query.into(), offset: offset.into() }
} }
pub fn id<S>(mut self, val: S) -> Self where S: Into<String> { pub fn id<S>(mut self, val: S) -> Self
self.id = val.into();self where
S: Into<String>,
{
self.id = val.into();
self
} }
pub fn from(mut self, val: User) -> Self { pub fn from(mut self, val: User) -> Self {
self.from =val; self.from = val;
self self
} }
@ -52,12 +56,19 @@ impl InlineQuery {
self self
} }
pub fn query<S>(mut self, val: S) -> Self where S: Into<String> { pub fn query<S>(mut self, val: S) -> Self
self.query = val.into();self where
S: Into<String>,
{
self.query = val.into();
self
} }
pub fn offset<S>(mut self, val: S) -> Self where S: Into<String> { pub fn offset<S>(mut self, val: S) -> Self
self.offset = val.into();self where
S: Into<String>,
{
self.offset = val.into();
self
} }
} }