Skip to content

Commit d48a695

Browse files
author
WaySLOG
committed
Merge pull request #349 from wayslog/master
bug fixed after lolisa review
2 parents ba848e1 + d8aab19 commit d48a695

4 files changed

Lines changed: 23 additions & 141 deletions

File tree

README.md

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -32,124 +32,6 @@ blog: https://rust-china.org/
3232

3333
wiki: https://wiki.rust-china.org/
3434

35-
## 大纲
36-
37-
* [初识Rust](1st-glance/README.md)「daogangtang, tiansiyuan」
38-
* [安装Rust](install/preface.md)「marvin-min」
39-
* [Linux](install/install_rust_on_linux.md)
40-
* [Mac](install/install_rust_on_mac_os.md)
41-
* [Windows](install/install_rust_on_windows.md)
42-
* [版本管理工具: multirust](install/multirust.md)
43-
* [编辑器](editors/preface.md)
44-
* [前期准备](editors/before.md)「wayslog」
45-
* [vim](editors/vim.md)「wayslog」
46-
* [emacs](editors/emacs.md)「tiansiyuan」
47-
* [vscode](editors/vscode.md)「daogangtang」
48-
* [atom](editors/atom.md)「wayslog」
49-
* [sublime](editors/sublime.md)「domty」
50-
* [visual studio](editors/visualstudio.md)「marvinguo」
51-
* [spacemacs](editors/spacemacs.md)「wayslog」
52-
* [Rust快速入门](quickstart/quickstart.md)「Naupio」
53-
* [Rust旅程](quickstart/rust-travel.md)
54-
* [基础类型](quickstart/primitive-type.md)
55-
* [向量与字符串](quickstart/vector-string.md)
56-
* [结构体与枚举](quickstart/struct-enum.md)
57-
* [操作流](quickstart/control-flow.md)
58-
* [函数与方法](quickstart/function-method.md)
59-
* [特性](quickstart/trait.md)
60-
* [注释与文档](quickstart/comments-document.md)
61-
* [输入输出流](quickstart/io-stream.md)
62-
* [Cargo项目管理器](cargo-projects-manager/cargo-projects-manager.md)「fuyingfuying」
63-
* [基本程序结构](flow/preface.md)「daogangtang」
64-
* [注释](flow/comment.md)
65-
* [条件](flow/condition.md)
66-
* [循环](flow/repetition.md)
67-
* [类型、运算符和字符串](type/preface.md)「wayslog」
68-
* [基础类型](type/types.md)
69-
* [复合类型](type/compound-types.md)
70-
* [字符串类](type/string.md)
71-
* [基础运算符和字符串格式化](type/operator-and-formatting.md)
72-
* [函数](function/overview.md)「qdao」
73-
* [函数参数](function/arguement.md)
74-
* [函数返回值](function/return_value.md)
75-
* [语句和表达式](function/statement_expression.md)
76-
* [高阶函数](function/higher_order_function.md)
77-
* [模式匹配](match/overview.md)「wayslog」
78-
* [match关键字](match/match.md)
79-
* [模式](match/pattern.md)
80-
* [Trait(特征)](trait/overview.md)「JohnSmithX」
81-
* [trait关键字](trait/trait.md)
82-
* [trait对象](trait/trait-object.md)
83-
* [泛型](generic/generic.md)「stormgbs」
84-
* [可变性、所有权、租借和生命期](ownership-system/ownership_system.md)「stormgbs」
85-
* [所有权](ownership-system/ownership.md)
86-
* [引用和借用](ownership-system/borrowing_reference.md)
87-
* [生命周期](ownership-system/lifetime.md)
88-
* [闭包](closure/overview.md)「qdao」
89-
* [闭包的语法](closure/syntax.md)
90-
* [闭包的实现](closure/implementation.md)
91-
* [闭包作为参数和返回值](closure/as_argument_return_value.md)
92-
* [集合类型](collections/overview.md)「wayslog」
93-
* [动态数组](collections/vec.md)
94-
* [哈希表](collections/hashmap.md)
95-
* [迭代器](iterator/overview.md)「wayslog」
96-
* [迭代器、适配器、消费者](iterator/iterator.md)
97-
* [模块和包系统、Prelude](module/preface.md)「daogangtang」
98-
* [模块(module)和包(crate)](module/module.md)
99-
* [Prelude](module/prelude.md)
100-
* [Option、Result与错误处理](error-handling/option-result.md)「JohnSmithX」
101-
* [宏系统](macro/macro.md)「tennix」
102-
* [堆、栈与Box](heap-stack/heap-stack.md)「tennix」
103-
* [几种智能指针](rcarc/preface.md)「daogangtang」
104-
* [Rc, Arc](rcarc/rcarc.md)
105-
* [Mutex, RwLock](rcarc/mutex.md)
106-
* [Cell, RefCell](rcarc/cell.md)
107-
* [类型系统中的几个常见 Trait](intoborrow/preface.md) 「daogangtang」
108-
* [Into/From 及其在 String 和 &str 互转上的应用](intoborrow/into.md)
109-
* [AsRef, AsMut](intoborrow/asref.md)
110-
* [Borrow, BorrowMut, ToOwned](intoborrow/borrow.md)
111-
* [Deref 与 Deref coercions](intoborrow/deref.md)
112-
* [Cow 及其在 String 和 &str 上的应用](intoborrow/cow.md)
113-
* [Send 和 Sync](marker/sendsync.md)「daogangtang」
114-
* [并发,并行,多线程编程](concurrency-parallel-thread/preface.md)「anzhihun」
115-
* [线程](concurrency-parallel-thread/thread.md)
116-
* [消息传递](concurrency-parallel-thread/message-passing.md)
117-
* [共享内存](concurrency-parallel-thread/share-memory.md)
118-
* [同步](concurrency-parallel-thread/synchronize.md)
119-
* [并行](concurrency-parallel-thread/parallel.md)
120-
* [Unsafe、原始指针](unsafe-rawpointer/preface.md)「JohnSmithX」
121-
* [Unsafe](unsafe-rawpointer/unsafe.md)
122-
* [原始指针](unsafe-rawpointer/raw-pointer.md)
123-
* [FFI](ffi/preface.md)「42」
124-
* [rust调用ffi函数](ffi/calling-ffi-function.md)
125-
* [将rust编译成库](ffi/compiling-rust-to-lib.md)
126-
* [运算符重载](operator-overloading/operator.md)「wayslog」
127-
* [属性和编译器参数](attr-and-compiler-arg/preface.md)「elton」
128-
* [属性](attr-and-compiler-arg/attribute.md)
129-
* [编译器参数](attr-and-compiler-arg/rustc-option.md)
130-
* [Cargo参数配置](cargo-detailed-cfg/cargo-detailed-cfg.md)「fuyingfuying」
131-
* [测试与评测](testing/preface.md)「daogangtang」
132-
* [测试](testing/threearchtest.md)
133-
* [评测](testing/bench.md)
134-
* [代码风格](coding-style/style.md)「tiansiyuan」
135-
* [Any与反射](any/any.md)「wayslog」
136-
* [安全(safe)](safe/safe.md)「daogangtang」
137-
* [常用数据结构实现](data-structure/preface.md)「Naupio」
138-
* [栈结构](data-structure/stack.md)
139-
* [队列](data-structure/queue.md)
140-
* [优先队列](data-structure/priority_queue.md)
141-
* [二叉树](data-structure/binary_tree.md)
142-
* [链表](data-structure/linked_list.md)
143-
* [图结构](data-structure/graph.md)
144-
* [标准库介绍](std/overview.md)「wayslog」
145-
* [系统命令:调用grep](std/process.md)
146-
* [目录操作:简单grep](std/fs-and-path.md)
147-
* [网络模块:W回音](std/net.md)
148-
* [实战篇](action/preface.md)「wangyu190810」
149-
* [实战:Json处理](action/json_data/readme.md)
150-
* [实战:Web 应用开发入门](action/mysite/readme.md)
151-
* [实战:使用Postgresql数据库](action/db/readme.md)
152-
15335
## 版权规定
15436

15537
本书使用 `CC BY-SA 3.0` 协议,转载请注明地址。

SUMMARY.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,28 @@
2929
* [基本程序结构](flow/preface.md)「daogangtang」
3030
* [注释](flow/comment.md)
3131
* [条件](flow/condition.md)
32-
* [循环](flow/repeatition.md)
32+
* [循环](flow/repetition.md)
3333
* [类型、运算符和字符串](type/preface.md)「wayslog」
3434
* [基础类型](type/types.md)
3535
* [复合类型](type/compound-types.md)
36-
* [字符串类](type/strings.md)
37-
* [基础运算符和字符串格式化](type/operator-and-format.md)
36+
* [字符串类](type/string.md)
37+
* [基础运算符和字符串格式化](type/operator-and-formatting.md)
3838
* [函数](function/overview.md)「qdao」
3939
* [函数参数](function/arguement.md)
4040
* [函数返回值](function/return_value.md)
4141
* [语句和表达式](function/statement_expression.md)
42-
* [高阶函数](function/high_order_function.md)
42+
* [高阶函数](function/higher_order_function.md)
4343
* [模式匹配](match/overview.md)「wayslog」
4444
* [match关键字](match/match.md)
4545
* [模式](match/pattern.md)
4646
* [Trait (特征)](trait/overview.md)「JohnSmithX」
4747
* [trait关键字](trait/trait.md)
4848
* [trait对象](trait/trait-object.md)
49-
* [泛型](generics/generics.md)「stormgbs」
49+
* [泛型](generic/generic.md)「stormgbs」
5050
* [可变性、所有权、租借和生命期](ownership-system/ownership_system.md)「stormgbs」
5151
* [所有权](ownership-system/ownership.md)
52-
* [引用和借用](ownership-system/borrowing_references.md)
53-
* [生命周期](ownership-system/lifetimes.md)
52+
* [引用和借用](ownership-system/borrowing_reference.md)
53+
* [生命周期](ownership-system/lifetime.md)
5454
* [闭包](closure/overview.md)「qdao」
5555
* [闭包的语法](closure/syntax.md)
5656
* [闭包的实现](closure/implementation.md)
@@ -60,9 +60,9 @@
6060
* [哈希表](collections/hashmap.md)
6161
* [迭代器](iterator/overview.md)「wayslog」
6262
* [迭代器、适配器、消费者](iterator/iterator.md)
63-
* [模块和包系统、Prelude](modules/preface.md)「daogangtang」
64-
* [模块(module)和包(crate)](modules/module.md)
65-
* [Prelude](modules/prelude.md)
63+
* [模块和包系统、Prelude](module/preface.md)「daogangtang」
64+
* [模块(module)和包(crate)](module/module.md)
65+
* [Prelude](module/prelude.md)
6666
* [Option、Result与错误处理](error-handling/option-result.md)「JohnSmithX」
6767
* [宏系统](macro/macro.md)「tennix」
6868
* [堆、栈与Box](heap-stack/heap-stack.md)「tennix」
@@ -77,29 +77,29 @@
7777
* [Deref 与 Deref coercions](intoborrow/deref.md)
7878
* [Cow 及其在 String 和 &str 上的应用](intoborrow/cow.md)
7979
* [Send 和 Sync](marker/sendsync.md)「daogangtang」
80-
* [并发,并行,多线程编程](concurrency-parallel-threads/preface.md)「anzhihun」
81-
* [线程](concurrency-parallel-threads/thread.md)
82-
* [消息传递](concurrency-parallel-threads/message-passing.md)
83-
* [共享内存](concurrency-parallel-threads/share-memory.md)
84-
* [同步](concurrency-parallel-threads/synchronize.md)
85-
* [并行](concurrency-parallel-threads/parallel.md)
80+
* [并发,并行,多线程编程](concurrency-parallel-thread/preface.md)「anzhihun」
81+
* [线程](concurrency-parallel-thread/thread.md)
82+
* [消息传递](concurrency-parallel-thread/message-passing.md)
83+
* [共享内存](concurrency-parallel-thread/share-memory.md)
84+
* [同步](concurrency-parallel-thread/synchronize.md)
85+
* [并行](concurrency-parallel-thread/parallel.md)
8686
* [Unsafe、原始指针](unsafe-rawpointer/preface.md)「JohnSmithX」
8787
* [Unsafe](unsafe-rawpointer/unsafe.md)
8888
* [原始指针](unsafe-rawpointer/raw-pointer.md)
8989
* [FFI](ffi/preface.md)「42」
90-
* [rust调用ffi函数](ffi/calling-ffi-functions.md)
90+
* [rust调用ffi函数](ffi/calling-ffi-function.md)
9191
* [将rust编译成库](ffi/compiling-rust-to-lib.md)
9292
* [运算符重载](operator-overloading/operator.md)「wayslog」
93-
* [属性和编译器参数](attr-and-compiler-args/preface.md)「elton」
94-
* [属性](attr-and-compiler-args/attributes.md)
95-
* [编译器参数](attr-and-compiler-args/rustc-options.md)
93+
* [属性和编译器参数](attr-and-compiler-arg/preface.md)「elton」
94+
* [属性](attr-and-compiler-arg/attribute.md)
95+
* [编译器参数](attr-and-compiler-arg/rustc-option.md)
9696
* [Cargo参数配置](cargo-detailed-cfg/cargo-detailed-cfg.md)「fuyingfuying」
9797
* [测试与评测](testing/preface.md)「daogangtang」
9898
* [测试 (testing)](testing/threearchtest.md)
9999
* [评测 (benchmark)](testing/bench.md)
100100
* [代码风格](coding-style/style.md)「tiansiyuan」
101101
* [Any与反射](any/any.md)「wayslog」
102-
* [安全(safe)](safe/safe.md)「daogangtang」
102+
* [安全(safe)](safe/safety.md)「daogangtang」
103103
* [常用数据结构实现](data-structure/preface.md)「Naupio」
104104
* [栈结构](data-structure/stack.md)
105105
* [队列](data-structure/queue.md)

function/arguement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn say_what(name: &str, func: fn(&str)) {
3535
func(name)
3636
}
3737
```
38-
上例中,`hi`函数和`hello`函数都是只有一个`&str`类型的参数且没有返回值。而`say_what`函数则有两个参数,一个是`&str`类型,另一个则是函数类型(function type),它是只有一个`&str`类型参数且没有返回值的函数类型。关于函数类型的详细说明,请看[第4节 高阶函数](high_order_function.md)
38+
上例中,`hi`函数和`hello`函数都是只有一个`&str`类型的参数且没有返回值。而`say_what`函数则有两个参数,一个是`&str`类型,另一个则是函数类型(function type),它是只有一个`&str`类型参数且没有返回值的函数类型。
3939

4040
## 模式匹配
4141
支持模式匹配,让rust平添了许多的灵活性,用起来也是十分的舒爽。模式匹配不仅可以用在变量声明(let语句)中,也可以用在函数参数声明中,如:

function/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ fn main() {
1111
1. [函数参数](arguement.md)
1212
2. [函数返回值](return_value.md)
1313
3. [语句和表达式](statement_expression.md)
14-
4. [高阶函数](high_order_function.md)
14+
4. [高阶函数](higher_order_function.md)
1515

1616
> ### 注:本章所有例子均在rustc1.4下编译通过,且例子中说明的所有的编译错误都是rustc1.4版本给出的。

0 commit comments

Comments
 (0)