Skip to content

Commit 91b4ed7

Browse files
committed
feat(decompression-plz): added pop_last_encoding and push_last_encoding to dstruct
1 parent 848ed9d commit 91b4ed7

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

decompression-plz/src/dstruct.rs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,20 @@ impl<'a> DecompressionStruct<'a> {
4646
}
4747

4848
pub fn pop_last_encoding(&mut self) -> ContentEncoding {
49-
/*
50-
&mut self
51-
.encoding_info
52-
.last()
49+
self.encoding_info
50+
.last_mut()
5351
.unwrap()
5452
.encodings_as_mut()
5553
.pop()
5654
.unwrap()
57-
*/
58-
todo!()
5955
}
6056

6157
pub fn push_last_encoding(&mut self, encoding: ContentEncoding) {
62-
todo!()
63-
//self.encoding_info
64-
// .last_mut()
65-
// .unwrap()
66-
// .encodings_as_mut()
67-
// .push(encoding);
58+
self.encoding_info
59+
.last_mut()
60+
.unwrap()
61+
.encodings_as_mut()
62+
.push(encoding);
6863
}
6964

7065
pub fn is_encodings_empty(&self) -> bool {
@@ -87,7 +82,6 @@ impl<'a> DecompressionStruct<'a> {
8782
pub fn try_decompress_extra(
8883
&mut self,
8984
) -> Result<BytesMut, MultiDecompressError> {
90-
//let mut writer = self.writer.writer();
9185
decompress_multi(
9286
self.extra.as_ref().unwrap().as_ref(),
9387
&mut self.writer,

0 commit comments

Comments
 (0)