fix bug introduced in the last change

master
Paul Woolcock 6 years ago
parent 87a0c103e6
commit 01704d7169
  1. 10
      src/lib.rs

@ -601,11 +601,11 @@ impl Mastodon {
pub fn statuses<'a, S>(&self, id: &str, request: S) -> Result<Page<Status>> pub fn statuses<'a, S>(&self, id: &str, request: S) -> Result<Page<Status>>
where S: Into<Option<StatusesRequest<'a>>> where S: Into<Option<StatusesRequest<'a>>>
{ {
let url = if let Some(request) = request.into() { let mut url = format!("{}/api/v1/accounts/{}/statuses", self.base, id);
request.to_querystring()
} else { if let Some(request) = request.into() {
format!("{}/api/v1/accounts/{}/statuses", self.base, id) url = format!("{}/{}", url, request.to_querystring());
}; }
let response = self.client.get(&url) let response = self.client.get(&url)
.headers(self.headers.clone()) .headers(self.headers.clone())

Loading…
Cancel
Save