From d3ee6d9f443aa5d9d54f2831359db46fe0a20b44 Mon Sep 17 00:00:00 2001 From: spike <86768220+yaoming00@users.noreply.github.com> Date: Wed, 23 Feb 2022 11:22:00 +0800 Subject: [PATCH 1/2] fix(path): fix file reference error fix file reference error --- contents/basic/result-error/result.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/basic/result-error/result.md b/contents/basic/result-error/result.md index c0342e5d..c578830b 100644 --- a/contents/basic/result-error/result.md +++ b/contents/basic/result-error/result.md @@ -95,7 +95,7 @@ fn main() { - 如果是文件不存在错误 `ErrorKind::NotFound`,就创建文件,这里创建文件`File::create` 也是返回 `Result`,因此继续用 `match` 对其结果进行处理:创建成功,将新的文件句柄赋值给 `f`,如果失败,则 `panic` - 剩下的错误,一律 `panic` -虽然很清晰,但是代码还是有些啰嗦,我们会在[简化错误处理](../../advance/errors/simplify.md)一章重点讲述如何写出更优雅的错误。 +虽然很清晰,但是代码还是有些啰嗦,我们会在[简化错误处理](../../advance/errors.md)一章重点讲述如何写出更优雅的错误。 ## 失败就 panic: unwrap 和 expect 上一节中,已经看到过这两兄弟的简单介绍,这里再来回顾下。 From 88cffa482ae8a5bc72fd0c6de6835abf88fd6276 Mon Sep 17 00:00:00 2001 From: Sunface Date: Wed, 23 Feb 2022 11:41:42 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 56a16aa4..57dbb8df 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ - 国内镜像: [https://book.rust.team](https://book.rust.team) - 知乎: [支持章节内目录跳转,很好用!](https://www.zhihu.com/column/c_1452781034895446017) -- 最近修订: 2022-02-17 新增 [Cargo使用指南 - 初印象](https://zhuanlan.zhihu.com/p/470251959) +- 最近修订: 2022-02-22 新增 [Cargo使用指南 - Cargo.toml VS Cargo.lock](https://zhuanlan.zhihu.com/p/470815396) - Rust版本: Rust edition 2021 - QQ交流群:1009730433