From 33631de855cfb18344675d2773b31c2e3426aa00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A1=BB=E8=AF=AD?= <131151317+Rainanxu@users.noreply.github.com> Date: Wed, 11 Dec 2024 19:47:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A4=BA=E4=BE=8B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BC=96=E5=8F=B7=E9=94=99=E8=AF=AF=20ch13-03-improvi?= =?UTF-8?q?ng-our-io-project.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ch13-03-improving-our-io-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch13-03-improving-our-io-project.md b/src/ch13-03-improving-our-io-project.md index 3ec2d56..fe85d9b 100644 --- a/src/ch13-03-improving-our-io-project.md +++ b/src/ch13-03-improving-our-io-project.md @@ -44,7 +44,7 @@ {{#rustdoc_include ../listings/ch13-functional-features/listing-13-18/src/main.rs:here}} ``` -示例 13-25:将 `env::args` 的返回值传递给 `Config::build` +示例 13-18:将 `env::args` 的返回值传递给 `Config::build` `env::args` 函数返回一个迭代器!不同于将迭代器的值收集到一个 vector 中接着传递一个 slice 给 `Config::build`,现在我们直接将 `env::args` 返回的迭代器的所有权传递给 `Config::build`。