Skip to content

Commit

Permalink
Merge pull request #840 from Rainanxu/main
Browse files Browse the repository at this point in the history
修复示例代码编号错误 ch13-03-improving-our-io-project.md
  • Loading branch information
KaiserY authored Dec 12, 2024
2 parents 9c6e06f + 33631de commit b42130e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch13-03-improving-our-io-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{{#rustdoc_include ../listings/ch13-functional-features/listing-13-18/src/main.rs:here}}
```

<span class="caption">示例 13-25:将 `env::args` 的返回值传递给 `Config::build`</span>
<span class="caption">示例 13-18:将 `env::args` 的返回值传递给 `Config::build`</span>

`env::args` 函数返回一个迭代器!不同于将迭代器的值收集到一个 vector 中接着传递一个 slice 给 `Config::build`,现在我们直接将 `env::args` 返回的迭代器的所有权传递给 `Config::build`

Expand Down

0 comments on commit b42130e

Please sign in to comment.