From dd720348495e877c23b713978b7e6f82cb384fa8 Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Tue, 5 Mar 2019 23:38:28 -0500 Subject: [PATCH] use string for status id in StatusBuilder --- src/registration.rs | 9 +++------ src/status_builder.rs | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/registration.rs b/src/registration.rs index ddd59f3..7f72640 100644 --- a/src/registration.rs +++ b/src/registration.rs @@ -284,12 +284,9 @@ impl Registered { /// provided by the authorisation url. pub fn complete(&self, code: &str) -> Result> { let url = format!( - "{}/oauth/token?client_id={}&client_secret={}&code={}&grant_type=authorization_code&redirect_uri={}", - self.base, - self.client_id, - self.client_secret, - code, - self.redirect + "{}/oauth/token?client_id={}&client_secret={}&code={}&grant_type=authorization_code&\ + redirect_uri={}", + self.base, self.client_id, self.client_secret, code, self.redirect ); let token: AccessToken = self.send(self.client.post(&url))?.json()?; diff --git a/src/status_builder.rs b/src/status_builder.rs index 197d540..06a25ea 100644 --- a/src/status_builder.rs +++ b/src/status_builder.rs @@ -21,9 +21,9 @@ use std::fmt; pub struct StatusBuilder { /// The text of the status. pub status: String, - /// Ids of accounts being replied to. + /// Id of status being replied to. #[serde(skip_serializing_if = "Option::is_none")] - pub in_reply_to_id: Option, + pub in_reply_to_id: Option, /// Ids of media attachments being attached to the status. #[serde(skip_serializing_if = "Option::is_none")] pub media_ids: Option>,