diff options
Diffstat (limited to 'src/model/channel/attachment.rs')
| -rw-r--r-- | src/model/channel/attachment.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/model/channel/attachment.rs b/src/model/channel/attachment.rs index 079f4a9..8a3cbfa 100644 --- a/src/model/channel/attachment.rs +++ b/src/model/channel/attachment.rs @@ -32,9 +32,8 @@ 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. |