From e78695f2fa55259edbb6b7721411d75022a79946 Mon Sep 17 00:00:00 2001 From: Allan Downey Date: Sat, 12 Feb 2022 23:13:20 +0800 Subject: [PATCH] fix typo and $ with command --- book/contents/first-try/cargo.md | 2 +- book/contents/first-try/installation.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/book/contents/first-try/cargo.md b/book/contents/first-try/cargo.md index c176820e..2912e541 100644 --- a/book/contents/first-try/cargo.md +++ b/book/contents/first-try/cargo.md @@ -2,7 +2,7 @@ 但凡经历过 C/C++ 或 Go 语言 1.10 版本之前的用户都知道,一个好的包管理工具有多么的重要!!我那个时候是如此的渴望类似 `nodejs` 的 `npm `包管理工具,但是却求而不得。 -包管理工具最重要的意义就是**任何用户拿到你的代码,都能运行起来**",而不会因为各种包版本依赖焦头烂额。 +包管理工具最重要的意义就是**任何用户拿到你的代码,都能运行起来**,而不会因为各种包版本依赖焦头烂额。 Go 语言在 1.10 版本之前,所有的包都是在 `github.com` 下存放,导致了所有的项目都公用一套依赖代码,在本地项目复杂后,这简直是一种灾难。 diff --git a/book/contents/first-try/installation.md b/book/contents/first-try/installation.md index 64c26097..88e096ef 100644 --- a/book/contents/first-try/installation.md +++ b/book/contents/first-try/installation.md @@ -14,7 +14,7 @@ 打开终端并输入下面命令: ```console -curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh +$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh ``` 这个命令将下载一个脚本并开始安装 `rustup` 工具,此工具将安装 Rust 的最新稳定版本。可能会提示你输入管理员密码。 @@ -34,7 +34,7 @@ Rust 对运行环境的依赖和 Go 语言很像,几乎所有环境都可以 **MacOS 下:** ```console -xcode-select --install +$ xcode-select --install ``` **Linux 下:** @@ -82,7 +82,7 @@ Current installation options: 配置好后,在 MSYS 中输入下面的命令来安装 rustup。 ```bash -curl https://sh.rustup.rs -sSf | sh +$ curl https://sh.rustup.rs -sSf | sh ``` 之后,根据以下输出进行配置。 @@ -135,7 +135,7 @@ Current installation options: 要卸载 Rust 和 `rustup`,在终端执行以下命令即可卸载: ```bash -rustup self uninstall +$ rustup self uninstall ``` ## 检查安装是否成功 @@ -143,10 +143,10 @@ rustup self uninstall 检查是否正确安装了 Rust,可打开终端并输入下面这行,此时能看到最新发布的稳定版本的版本号、提交哈希值和提交日期: ```bash -rustc -V +$ rustc -V rustc 1.56.1 (59eed8a2a 2021-11-01) -cargo -V +$ cargo -V cargo 1.57.0 (b2e52d7ca 2021-10-21) ``` > 注:若发现版本号不同,以您的版本号为准