1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

fix awc clippy warning (#2431)

This commit is contained in:
fakeshadow
2021-11-04 23:57:55 +08:00
committed by GitHub
parent 6ec2d7b909
commit 5e554dca35
2 changed files with 8 additions and 9 deletions

View File

@ -795,17 +795,15 @@ async fn client_unread_response() {
let lst = std::net::TcpListener::bind(addr).unwrap();
std::thread::spawn(move || {
for stream in lst.incoming() {
let mut stream = stream.unwrap();
let mut b = [0; 1000];
let _ = stream.read(&mut b).unwrap();
let _ = stream.write_all(
b"HTTP/1.1 200 OK\r\n\
let (mut stream, _) = lst.accept().unwrap();
let mut b = [0; 1000];
let _ = stream.read(&mut b).unwrap();
let _ = stream.write_all(
b"HTTP/1.1 200 OK\r\n\
connection: close\r\n\
\r\n\
welcome!",
);
}
);
});
// client request