Skip to content

Commit cec7c90

Browse files
committed
refactor(decompression-plz): linting errors
1 parent 0c7dc7d commit cec7c90

File tree

1 file changed

+8
-5
lines changed
  • decompression-plz/tests/test_cases/chunked

1 file changed

+8
-5
lines changed

decompression-plz/tests/test_cases/chunked.rs renamed to decompression-plz/tests/test_cases/chunked/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use body_plz::variants::chunked::ChunkType;
33
use decompression_plz::chunked::{chunked_to_raw, partial_chunked_to_raw};
44
use tests_utils::{INPUT, all_compressed_data};
55

6-
const HEADERS: &str = "Host: example.com\r\n\
6+
const CHUNKED_HEADER: &str = "Host: example.com\r\n\
77
Content-Type: text/html; charset=utf-8\r\n\
88
Transfer-Encoding: chunked\r\n\r\n";
99

@@ -38,7 +38,7 @@ fn test_chunked_to_raw() {
3838
let body = build_chunked_body_large();
3939
let mut buf = BytesMut::new();
4040

41-
let mut tm = TestMessage::build(HEADERS.into(), body, None);
41+
let mut tm = TestMessage::build(CHUNKED_HEADER.into(), body, None);
4242
chunked_to_raw(&mut tm, &mut buf);
4343
let verify = "Host: example.com\r\n\
4444
Content-Type: text/html; charset=utf-8\r\n\
@@ -55,7 +55,7 @@ fn test_chunked_to_raw_with_trailer() {
5555
let trailer_chunk =
5656
ChunkType::Trailers(HeaderMap::from(BytesMut::from(trailer_headers)));
5757
body.push_chunk(trailer_chunk);
58-
let mut tm = TestMessage::build(HEADERS.into(), body, None);
58+
let mut tm = TestMessage::build(CHUNKED_HEADER.into(), body, None);
5959
let mut buf = BytesMut::new();
6060
chunked_to_raw(&mut tm, &mut buf);
6161
let verify = "Host: example.com\r\n\
@@ -85,8 +85,11 @@ fn test_partial_chunked_to_raw() {
8585
// state
8686
#[test]
8787
fn test_chunked_body_large() {
88-
let mut tm =
89-
TestMessage::build(HEADERS.into(), build_chunked_body_large(), None);
88+
let mut tm = TestMessage::build(
89+
CHUNKED_HEADER.into(),
90+
build_chunked_body_large(),
91+
None,
92+
);
9093
let mut buf = BytesMut::new();
9194
let mut state = DecodeState::init(&mut tm, &mut buf);
9295
state = state.try_next().unwrap();

0 commit comments

Comments
 (0)