micro_http: switch to rust edition 2018
Signed-off-by: Damien Stanton <damien.stanton@gmail.com> Signed-off-by: YUAN LYU <lyuyuan92@gmail.com>
This commit is contained in:
committed by
Adrian Catangiu
parent
88de0ed16b
commit
a7f035b8c5
@@ -5,13 +5,12 @@ use std::collections::VecDeque;
|
||||
use std::io::{Read, Write};
|
||||
|
||||
use crate::common::ascii::{CR, CRLF_LEN, LF};
|
||||
use crate::common::headers::Headers;
|
||||
use crate::common::{Body, RequestError};
|
||||
use crate::common::Body;
|
||||
pub use crate::common::{ConnectionError, RequestError};
|
||||
use crate::headers::Headers;
|
||||
use crate::request::{find, Request, RequestLine};
|
||||
use crate::response::{Response, StatusCode};
|
||||
|
||||
pub use crate::common::ConnectionError;
|
||||
|
||||
const BUFFER_SIZE: usize = 1024;
|
||||
|
||||
/// Describes the state machine of an HTTP connection.
|
||||
@@ -482,11 +481,12 @@ impl<T: Read + Write> HttpConnection<T> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use common::{Method, Version};
|
||||
use std::net::Shutdown;
|
||||
use std::os::unix::net::UnixStream;
|
||||
|
||||
use super::*;
|
||||
use crate::common::{Method, Version};
|
||||
|
||||
#[test]
|
||||
fn test_try_read_expect() {
|
||||
// Test request with `Expect` header.
|
||||
|
||||
Reference in New Issue
Block a user