Fix clippy: Implement From instead of Into
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
607d86219c
commit
34932cb295
|
@ -50,16 +50,16 @@ pub struct StatusesRequest<'a> {
|
||||||
min_id: Option<Cow<'a, str>>,
|
min_id: Option<Cow<'a, str>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Into<Option<StatusesRequest<'a>>> for &'a mut StatusesRequest<'a> {
|
impl<'a> From<&'a mut StatusesRequest<'a>> for Option<StatusesRequest<'a>> {
|
||||||
fn into(self) -> Option<StatusesRequest<'a>> {
|
fn from(sr: &'a mut StatusesRequest<'a>) -> Self {
|
||||||
Some(StatusesRequest {
|
Some(StatusesRequest {
|
||||||
only_media: self.only_media,
|
only_media: sr.only_media,
|
||||||
exclude_replies: self.exclude_replies,
|
exclude_replies: sr.exclude_replies,
|
||||||
pinned: self.pinned,
|
pinned: sr.pinned,
|
||||||
max_id: self.max_id.clone(),
|
max_id: sr.max_id.clone(),
|
||||||
since_id: self.since_id.clone(),
|
since_id: sr.since_id.clone(),
|
||||||
limit: self.limit,
|
limit: sr.limit,
|
||||||
min_id: self.min_id.clone(),
|
min_id: sr.min_id.clone(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue