Skip to content

Commit 190a305

Browse files
committed
test(decompression-plz): removed oneone-plz as dev dependency
1 parent 63a51ae commit 190a305

File tree

4 files changed

+11
-64
lines changed

4 files changed

+11
-64
lines changed

Cargo.lock

Lines changed: 0 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

decompression-plz/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,3 @@ zstd = "0.13.3"
2121
bytes = { workspace = true }
2222
thiserror = { workspace = true }
2323
tracing = { workspace = true }
24-
25-
[dev-dependencies]
26-
oneone-plz = "0.0.4"

decompression-plz/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,19 @@ where
3333
// helper function for tests
3434
#[cfg(test)]
3535
pub mod tests {
36+
use body_plz::variants::Body;
3637
use bytes::BytesMut;
3738
use flate2::Compression;
38-
use header_plz::body_headers::{
39-
content_encoding::ContentEncoding, encoding_info::EncodingInfo,
39+
use header_plz::{
40+
InfoLine,
41+
body_headers::{
42+
content_encoding::ContentEncoding, encoding_info::EncodingInfo,
43+
},
4044
};
4145
use std::io::Write;
4246

47+
use crate::DecompressTrait;
48+
4349
pub const INPUT: &[u8] = b"hello world";
4450

4551
pub fn all_compressed_data() -> Vec<u8> {

decompression-plz/src/state.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -178,27 +178,13 @@ where
178178
#[cfg(test)]
179179
mod tests {
180180

181+
use crate::decompress;
182+
use crate::decompress_trait::DecompressTrait;
183+
use body_plz::variants::Body;
181184
use header_plz::InfoLine;
182185
use header_plz::Request;
183186
use header_plz::body_headers::parse::ParseBodyHeaders;
184187
use header_plz::message_head::MessageHead;
185-
use oneone_plz::oneone::OneOne;
186188

187189
use super::*;
188-
189-
fn build_oneone<T>(input: &str) -> OneOne<T>
190-
where
191-
T: InfoLine,
192-
MessageHead<T>: ParseBodyHeaders,
193-
{
194-
OneOne::try_from(BytesMut::from(input)).unwrap()
195-
}
196-
197-
#[test]
198-
fn test_decode_state_init() {
199-
let input = "POST / HTTP/1.1\r\n\
200-
Content-Length: 11\r\n\r\n\
201-
hello world";
202-
let req: OneOne<Request> = build_oneone(input);
203-
}
204190
}

0 commit comments

Comments
 (0)