diff options
| author | acdenisSK <[email protected]> | 2017-07-27 08:10:41 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-27 08:10:41 +0200 |
| commit | 70b5097aaac85f970c32ceb988dbb5f5d575ee0f (patch) | |
| tree | d2f391d3b552cfae58b74748a2a2aa5ae80c7986 /src/model/webhook.rs | |
| parent | rustfmt (diff) | |
| download | serenity-70b5097aaac85f970c32ceb988dbb5f5d575ee0f.tar.xz serenity-70b5097aaac85f970c32ceb988dbb5f5d575ee0f.zip | |
Change the config a bit, and a few nitpicks
Diffstat (limited to 'src/model/webhook.rs')
| -rw-r--r-- | src/model/webhook.rs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/model/webhook.rs b/src/model/webhook.rs index 9422d46..5e10d90 100644 --- a/src/model/webhook.rs +++ b/src/model/webhook.rs @@ -107,12 +107,14 @@ impl Webhook { let mut map = Map::new(); if let Some(avatar) = avatar { - map.insert("avatar".to_owned(), - if avatar.is_empty() { - Value::Null - } else { - Value::String(avatar.to_owned()) - }); + map.insert( + "avatar".to_owned(), + if avatar.is_empty() { + Value::Null + } else { + Value::String(avatar.to_owned()) + }, + ); } if let Some(name) = name { @@ -181,10 +183,12 @@ impl Webhook { wait: bool, f: F) -> Result<Option<Message>> { - http::execute_webhook(self.id.0, - &self.token, - wait, - &f(ExecuteWebhook::default()).0) + http::execute_webhook( + self.id.0, + &self.token, + wait, + &f(ExecuteWebhook::default()).0, + ) } /// Retrieves the latest information about the webhook, editing the |