Skip to content

Conversation

ijustlearn
Copy link
Contributor

 let mut buf = [0u8; 1024];
    stream.read(&mut buf).await.unwrap();

stream.read在handle_connection函数里面已经读取过了。另外stream的read方法本来就是mock,不需要验证

``` rust
 let mut buf = [0u8; 1024];
    stream.read(&mut buf).await.unwrap();
```
这段代码多余了,stream.read在handle_connection函数里面已经读取过了。另外stream的read方法本来就是mock,不需要验证
Copy link
Owner

@sunface sunface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没毛病

@sunface sunface merged commit 92d9894 into sunface:main Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants