2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 19:31:35 +00:00

Remove redundant code

This commit is contained in:
asonix 2020-06-06 22:24:33 -05:00
parent b7a66c7863
commit 1b526f4c1f

View file

@ -203,19 +203,12 @@ impl UploadManager {
(img, format) (img, format)
}; };
let format = self let (format, content_type) = self
.inner .inner
.format .format
.as_ref() .as_ref()
.map(|f| f.to_image_format()) .map(|f| (f.to_image_format(), f.to_mime()))
.unwrap_or(format); .unwrap_or((format, content_type));
let content_type = self
.inner
.format
.as_ref()
.map(|f| f.to_mime())
.unwrap_or(content_type);
let bytes: bytes::Bytes = { let bytes: bytes::Bytes = {
let mut bytes = std::io::Cursor::new(vec![]); let mut bytes = std::io::Cursor::new(vec![]);