Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/advance-practice/spawning.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async fn process(socket: TcpStream) {

现在运行我们的简单服务器 :

```shel
```shell
cargo run
```

Expand Down
2 changes: 1 addition & 1 deletion src/advance/smart-pointer/drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Drop for HasTwoDrops {

原因在于,Rust 自动为几乎所有类型都实现了 `Drop` 特征,因此就算你不手动为结构体实现 `Drop`,它依然会调用默认实现的 `drop` 函数,同时再调用每个字段的 `drop` 方法,最终打印出:

```cnosole
```console
Dropping HasDrop1!
Dropping HasDrop2!
```
Expand Down
2 changes: 1 addition & 1 deletion src/basic/compound-type/string-slice.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn greet(name: String) {

`greet` 函数接受一个字符串类型的 `name` 参数,然后打印到终端控制台中,非常好理解,你们猜猜,这段代码能否通过编译?

```conole
```console
error[E0308]: mismatched types
--> src/main.rs:3:11
|
Expand Down