From f352f1c2f9a70207e0525b3f2e6eb80d00d47513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=A4=E7=8B=90=E4=B8=80=E5=86=B2?= <43949039+anonymousGiga@users.noreply.github.com> Date: Wed, 17 May 2023 10:55:04 +0800 Subject: [PATCH] Update chapter_2.md --- src/chapter_2.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chapter_2.md b/src/chapter_2.md index bff969b..fb3ae68 100644 --- a/src/chapter_2.md +++ b/src/chapter_2.md @@ -120,7 +120,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 2. 对于Windows用户 -- 访问https://rustup.rs/,点击"Get started"。 +- 访问https://rustup.rs/ ,点击"Get started"。 - 下载rustup-init.exe安装程序。 - 双击rustup-init.exe运行安装程序,按照提示操作。 - 在安装过程中,选择默认选项(按回车键)即可。 @@ -143,9 +143,10 @@ Rust使用Cargo作为官方的构建工具和包管理器,下面通过Cargo创 ``` cargo new hello_world ``` - 创建后,可以看到整个目录的结构如下: + ![目录结构](../assets/62.png) + 其中Cargo.toml是项目的配置文件,src为源代码目录,main.rs为主程序文件。 ### 2.3.2 编写程序