From cbbcaa3432308b3828acfc7623876d2337cfd52a Mon Sep 17 00:00:00 2001 From: Folyd Wang Date: Tue, 12 Jul 2022 21:59:42 +0800 Subject: [PATCH 1/4] Fix typo --- solutions/basic-types/functions.md | 2 +- zh-CN/src/basic-types/functions.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/solutions/basic-types/functions.md b/solutions/basic-types/functions.md index da499fc..f33e184 100644 --- a/solutions/basic-types/functions.md +++ b/solutions/basic-types/functions.md @@ -52,7 +52,7 @@ fn never_return() -> ! { // implement this function, don't modify fn signatures loop { println!("I return nothing"); - // sleeping for 1 second to avoid exhausting the cpu resoucre + // sleeping for 1 second to avoid exhausting the cpu resource thread::sleep(time::Duration::from_secs(1)) } } diff --git a/zh-CN/src/basic-types/functions.md b/zh-CN/src/basic-types/functions.md index d3f93cb..b5528e6 100644 --- a/zh-CN/src/basic-types/functions.md +++ b/zh-CN/src/basic-types/functions.md @@ -86,7 +86,7 @@ fn main() { } }; - println!("Excercise Failed if printing out this line!"); + println!("Exercise Failed if printing out this line!"); } ``` From 9eae91f0e2703a23721d4c3259c257eea545a8f1 Mon Sep 17 00:00:00 2001 From: Skandesh <42321593+Skandesh@users.noreply.github.com> Date: Tue, 12 Jul 2022 22:41:12 +0530 Subject: [PATCH 2/4] Updating exercise's serial number Helps to keep track of the flow. --- en/src/variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/src/variables.md b/en/src/variables.md index 7e092f0..56eac27 100644 --- a/en/src/variables.md +++ b/en/src/variables.md @@ -99,7 +99,7 @@ fn main() { ``` ### Unused variables -1. Fix the warning below with : +7. Fix the warning below with : - 🌟 Only one solution - 🌟🌟 Two distinct solutions From 0c169f2455c0773cfbed8e0aeef04d3495751f82 Mon Sep 17 00:00:00 2001 From: wenqingl <86453680+wenqingl@users.noreply.github.com> Date: Wed, 13 Jul 2022 13:00:51 -0700 Subject: [PATCH 3/4] Update Readme.md --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index a284506..a5a0138 100644 --- a/Readme.md +++ b/Readme.md @@ -17,7 +17,7 @@ [![LICENSE](https://img.shields.io/badge/license-CC_BY_4.0-green?style=flat)](https://github.com/sunface/rust-by-practice/blob/master/LICENSE) -This book was designed for easily diving into and get skilled with Rust, and it's very easy to use: All you need to do is to make each exercise compile without ERRORS and Panics ! +This book was designed for easily diving into and getting skilled with Rust It's very easy to use. All you need to do is to make each exercise compile without ERRORS and Panics! ## Reading online From 64098013dfd12cedb5dcdc18caf0f5e8cd2b00ac Mon Sep 17 00:00:00 2001 From: caorufu <40569449+caorufu@users.noreply.github.com> Date: Thu, 14 Jul 2022 17:37:38 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=AD=A4=E7=94=B5=E5=AD=90=E4=B9=A6=E7=9A=84?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在win 10系统中,如果不加-n参数指定本地服务的ip地址,则服务监听的ip为空,无法通过浏览器访问。信息如下: >mdbook serve 2022-07-14 17:36:59 [INFO] (mdbook::book): Book building has started 2022-07-14 17:36:59 [INFO] (mdbook::book): Running the html backend 2022-07-14 17:36:59 [INFO] (mdbook::cmd::serve): Serving on: http://localhost:3000 2022-07-14 17:36:59 [INFO] (warp::server): Server::run; addr=[::1]:3000 2022-07-14 17:36:59 [INFO] (warp::server): listening on http://[::1]:3000 2022-07-14 17:36:59 [INFO] (mdbook::cmd::watch): Listening for changes... --- zh-CN/src/why-exercise.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zh-CN/src/why-exercise.md b/zh-CN/src/why-exercise.md index 6b029a3..3f243e3 100644 --- a/zh-CN/src/why-exercise.md +++ b/zh-CN/src/why-exercise.md @@ -26,7 +26,10 @@ $ cargo install mdbook $ cd rust-by-practice && mdbook serve ``` - +在本地win 10或者linux服务器上运行时,应当使用 -n 参数指定mdbook服务所监听的IP地址(-p 参数指定服务监听的端口,不指定则为默认的3000),以win 10本地运行为例: +```shell +$ mdbook serve -p 8888 -n 127.0.0.1 +``` ## 特性 部分示例和习题借鉴了 [Rust By Example](https://github.com/rust-lang/rust-by-example), 书中的示例真的非常棒!