mirror of
https://git.asonix.dog/asonix/pict-rs.git
synced 2024-11-28 04:21:12 +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)
|
||||
};
|
||||
|
||||
let format = self
|
||||
let (format, content_type) = self
|
||||
.inner
|
||||
.format
|
||||
.as_ref()
|
||||
.map(|f| f.to_image_format())
|
||||
.unwrap_or(format);
|
||||
|
||||
let content_type = self
|
||||
.inner
|
||||
.format
|
||||
.as_ref()
|
||||
.map(|f| f.to_mime())
|
||||
.unwrap_or(content_type);
|
||||
.map(|f| (f.to_image_format(), f.to_mime()))
|
||||
.unwrap_or((format, content_type));
|
||||
|
||||
let bytes: bytes::Bytes = {
|
||||
let mut bytes = std::io::Cursor::new(vec![]);
|
||||
|
|
Loading…
Reference in a new issue