REST: rust fmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 2d48533378
)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
683595940b
commit
0fad95f032
|
@ -560,7 +560,8 @@ async fn simple_static_file_download(
|
||||||
let mut response = match compression {
|
let mut response = match compression {
|
||||||
Some(CompressionMethod::Deflate) => {
|
Some(CompressionMethod::Deflate) => {
|
||||||
let mut enc = DeflateEncoder::with_quality(data, Level::Default);
|
let mut enc = DeflateEncoder::with_quality(data, Level::Default);
|
||||||
enc.compress_vec(&mut file, CHUNK_SIZE_LIMIT as usize).await?;
|
enc.compress_vec(&mut file, CHUNK_SIZE_LIMIT as usize)
|
||||||
|
.await?;
|
||||||
let mut response = Response::new(enc.into_inner().into());
|
let mut response = Response::new(enc.into_inner().into());
|
||||||
response.headers_mut().insert(
|
response.headers_mut().insert(
|
||||||
header::CONTENT_ENCODING,
|
header::CONTENT_ENCODING,
|
||||||
|
|
Loading…
Reference in New Issue