From 308c6e2e8d08764dd7428109860efd3251f57418 Mon Sep 17 00:00:00 2001 From: al00000 <37172315+al00000@users.noreply.github.com> Date: Fri, 17 Feb 2023 07:39:48 +0800 Subject: [PATCH] Update Config::new function name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `Config::new` 函数定义 改为 - `Config::build` 函数定义 --- src/ch12-03-improving-error-handling-and-modularity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch12-03-improving-error-handling-and-modularity.md b/src/ch12-03-improving-error-handling-and-modularity.md index 5ce3006..1190c45 100644 --- a/src/ch12-03-improving-error-handling-and-modularity.md +++ b/src/ch12-03-improving-error-handling-and-modularity.md @@ -235,7 +235,7 @@ Rust 提示我们的代码忽略了 `Result` 值,它可能表明这里存在 - `run` 函数定义 - 相关的 `use` 语句 - `Config` 的定义 -- `Config::new` 函数定义 +- `Config::build` 函数定义 现在 *src/lib.rs* 的内容应该看起来像示例 12-13(为了简洁省略了函数体)。注意直到下一个示例修改完 *src/main.rs* 之后,代码还不能编译: