clean-up: get rid of misplaced cfg(test)

Signed-off-by: Popa <dpopa@amazon.com>
Signed-off-by: YUAN LYU <lyuyuan92@gmail.com>
This commit is contained in:
Popa
2020-03-11 20:50:10 +02:00
committed by Adrian Catangiu
parent 548d297be7
commit 7eb11b44cb
2 changed files with 20 additions and 18 deletions

View File

@@ -179,15 +179,6 @@ impl Headers {
self.expect
}
#[cfg(test)]
pub fn new(content_length: i32, expect: bool, chunked: bool) -> Self {
Self {
content_length,
expect,
chunked,
}
}
/// Parses a byte slice into a Headers structure for a HTTP request.
///
/// The byte slice is expected to have the following format: </br>
@@ -299,6 +290,16 @@ impl MediaType {
mod tests {
use super::*;
impl Headers {
pub fn new(content_length: i32, expect: bool, chunked: bool) -> Self {
Self {
content_length,
expect,
chunked,
}
}
}
#[test]
fn test_default() {
let headers = Headers::default();