mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
better name
This commit is contained in:
parent
6974213036
commit
2eb3ad0de3
@ -95,7 +95,7 @@ impl PayloadWriter for PayloadType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum Decoder {
|
enum Decoder {
|
||||||
Zlib(DeflateDecoder<BytesWriter>),
|
Deflate(DeflateDecoder<BytesWriter>),
|
||||||
Gzip(Option<GzDecoder<Wrapper>>),
|
Gzip(Option<GzDecoder<Wrapper>>),
|
||||||
Br(BrotliDecoder<BytesWriter>),
|
Br(BrotliDecoder<BytesWriter>),
|
||||||
Identity,
|
Identity,
|
||||||
@ -148,7 +148,7 @@ impl EncodedPayload {
|
|||||||
let dec = match enc {
|
let dec = match enc {
|
||||||
ContentEncoding::Br => Decoder::Br(
|
ContentEncoding::Br => Decoder::Br(
|
||||||
BrotliDecoder::new(BytesWriter::default())),
|
BrotliDecoder::new(BytesWriter::default())),
|
||||||
ContentEncoding::Deflate => Decoder::Zlib(
|
ContentEncoding::Deflate => Decoder::Deflate(
|
||||||
DeflateDecoder::new(BytesWriter::default())),
|
DeflateDecoder::new(BytesWriter::default())),
|
||||||
ContentEncoding::Gzip => Decoder::Gzip(None),
|
ContentEncoding::Gzip => Decoder::Gzip(None),
|
||||||
_ => Decoder::Identity,
|
_ => Decoder::Identity,
|
||||||
@ -212,7 +212,7 @@ impl PayloadWriter for EncodedPayload {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Decoder::Zlib(ref mut decoder) => {
|
Decoder::Deflate(ref mut decoder) => {
|
||||||
match decoder.try_finish() {
|
match decoder.try_finish() {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
let b = decoder.get_mut().buf.take().freeze();
|
let b = decoder.get_mut().buf.take().freeze();
|
||||||
@ -291,7 +291,7 @@ impl PayloadWriter for EncodedPayload {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Decoder::Zlib(ref mut decoder) => {
|
Decoder::Deflate(ref mut decoder) => {
|
||||||
if decoder.write(&data).is_ok() {
|
if decoder.write(&data).is_ok() {
|
||||||
if decoder.flush().is_ok() {
|
if decoder.flush().is_ok() {
|
||||||
let b = decoder.get_mut().buf.take().freeze();
|
let b = decoder.get_mut().buf.take().freeze();
|
||||||
|
Loading…
Reference in New Issue
Block a user