Update web-server.md

``` rust
 let mut buf = [0u8; 1024];
    stream.read(&mut buf).await.unwrap();
```
这段代码多余了,stream.read在handle_connection函数里面已经读取过了。另外stream的read方法本来就是mock,不需要验证
pull/1545/head
changyang liu 3 weeks ago committed by GitHub
parent c839a8c032
commit 8a3f62cb6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -324,8 +324,6 @@ async fn test_handle_connection() {
};
handle_connection(&mut stream).await;
let mut buf = [0u8; 1024];
stream.read(&mut buf).await.unwrap();
let expected_contents = fs::read_to_string("hello.html").unwrap();
let expected_response = format!("HTTP/1.1 200 OK\r\n\r\n{}", expected_contents);

Loading…
Cancel
Save