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

@@ -129,15 +129,6 @@ impl RequestLine {
fn min_len() -> usize {
Method::Get.raw().len() + 1 + Version::Http10.raw().len() + 2
}
#[cfg(test)]
pub fn new(method: Method, uri: &str, http_version: Version) -> Self {
Self {
method,
uri: Uri::new(uri),
http_version,
}
}
}
/// Wrapper over an HTTP Request.
@@ -274,6 +265,16 @@ mod tests {
}
}
impl RequestLine {
pub fn new(method: Method, uri: &str, http_version: Version) -> Self {
Self {
method,
uri: Uri::new(uri),
http_version,
}
}
}
#[test]
fn test_uri() {
for tc in &vec![