aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Cheng <[email protected]>2017-09-26 08:03:49 -0400
committeracdenisSK <[email protected]>2017-09-26 15:21:03 +0200
commit71f709d0aceedb6d3091d0c28c9535e281270f71 (patch)
tree1e94830ae5470d337f3afe087828052948a341f9 /src
parentUpdate readme example (diff)
downloadserenity-71f709d0aceedb6d3091d0c28c9535e281270f71.tar.xz
serenity-71f709d0aceedb6d3091d0c28c9535e281270f71.zip
Use `request_client!` for attachment downloading (#165)
Diffstat (limited to 'src')
-rw-r--r--src/model/channel/attachment.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model/channel/attachment.rs b/src/model/channel/attachment.rs
index 8a3cbfa..2932899 100644
--- a/src/model/channel/attachment.rs
+++ b/src/model/channel/attachment.rs
@@ -106,7 +106,7 @@ impl Attachment {
/// [`Error::Io`]: ../enum.Error.html#variant.Io
/// [`Message`]: struct.Message.html
pub fn download(&self) -> Result<Vec<u8>> {
- let hyper = HyperClient::new();
+ let hyper = request_client!();
let mut response = hyper.get(&self.url).send()?;
let mut bytes = vec![];