Merge pull request #467 from Rustln/main

fix typo: `func` -> `fn`
pull/469/head
Sunface 3 years ago committed by GitHub
commit 1d2049ea0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -169,7 +169,7 @@ struct ChangeColorMessage(i32, i32, i32); // 元组结构体
例如我们有一个 WEB 服务,需要接受用户的长连接,假设连接有两种:`TcpStream` 和 `TlsStream`,但是我们希望对这两个连接的处理流程相同,也就是用同一个函数来处理这两个连接,代码如下:
```rust
func new (stream: TcpStream) {
fn new (stream: TcpStream) {
let mut s = stream;
if tls {
s = negotiate_tls(stream)

Loading…
Cancel
Save