diff options
| author | Zeyla Hellyer <[email protected]> | 2017-09-18 10:45:49 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-09-18 10:45:49 -0700 |
| commit | 220c153df8c58f693d90514a0a27de842bdbe3ef (patch) | |
| tree | d4f0eb35eb9ae8b174ea897c547d87fd604aecf7 /src | |
| parent | Alphabetize Cargo.toml dependencies (diff) | |
| download | serenity-220c153df8c58f693d90514a0a27de842bdbe3ef.tar.xz serenity-220c153df8c58f693d90514a0a27de842bdbe3ef.zip | |
Apply rustfmt
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/ratelimiting.rs | 4 | ||||
| -rw-r--r-- | src/model/channel/attachment.rs | 4 |
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. |