diff --git a/src/chapter_2.md b/src/chapter_2.md index 97c7cb7..adfab2f 100644 --- a/src/chapter_2.md +++ b/src/chapter_2.md @@ -114,8 +114,9 @@ Rust在系统工具和实用程序开发中也表现出色。Rust编写的工具 1. 对于macOS和Linux用户 通过如下命令进行安装: - -```curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh``` +``` +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` 2. 对于Windows用户 @@ -144,7 +145,7 @@ cargo new hello_world ``` 创建后,可以看到整个目录的结构如下: -![目录结构](assets/62.PNG) +![目录结构](../assets/62.PNG) 其中Cargo.toml是项目的配置文件,src为源代码目录,main.rs为主程序文件。 ### 2.3.2 编写程序 @@ -166,7 +167,7 @@ cargo run ``` 运行结果如下: -![运行结果](assets/63.png) +![运行结果](../assets/63.png) ### 2.3.4 理解Rust源码的基本结构 下面简单介绍Rust源码的结构。