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:
parent
b7a66c7863
commit
1b526f4c1f
1 changed files with 3 additions and 10 deletions
|
@ -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![]);
|
||||||
|
|
Loading…
Reference in a new issue