aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/http/ratelimiting.rs4
-rw-r--r--src/model/channel/attachment.rs4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/http/ratelimiting.rs b/src/http/ratelimiting.rs
index c401b53..bce9f12 100644
--- a/src/http/ratelimiting.rs
+++ b/src/http/ratelimiting.rs
@@ -508,7 +508,9 @@ fn parse_header(headers: &Headers, header: &str) -> Result<Option<i64>> {
str::from_utf8(&header[0])
.map_err(|_| Error::Http(HttpError::RateLimitUtf8))
.and_then(|v| {
- v.parse::<i64>().map(|v| Some(v)).map_err(|_| Error::Http(HttpError::RateLimitI64))
+ v.parse::<i64>().map(|v| Some(v)).map_err(|_| {
+ Error::Http(HttpError::RateLimitI64)
+ })
})
})
}
diff --git a/src/model/channel/attachment.rs b/src/model/channel/attachment.rs
index af15bf7..079f4a9 100644
--- a/src/model/channel/attachment.rs
+++ b/src/model/channel/attachment.rs
@@ -32,7 +32,9 @@ impl Attachment {
/// If this attachment is an image, then a tuple of the width and height
/// in pixels is returned.
pub fn dimensions(&self) -> Option<(u64, u64)> {
- self.width.and_then(|width| self.height.map(|height| (width, height)))
+ self.width.and_then(
+ |width| self.height.map(|height| (width, height)),
+ )
}
/// Downloads the attachment, returning back a vector of bytes.