Skip to content

Commit 6ecb2ed

Browse files
author
wayslog
committed
bug fixed 13-owner
1 parent 602dd42 commit 6ecb2ed

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

12-ownership-system/12-01-ownership.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ struct Foo {
213213
2. **自己实现Clone和Copy trait**
214214

215215
```rust
216+
216217
#[derive(Debug)]
217218
struct Foo {
218219
a: i32,
@@ -232,6 +233,7 @@ fn main() {
232233
println!("{:?}", x); //打印:Foo { a: 100, b: true }
233234
println!("{:?}", y); //打印:Foo { a: 100, b: false }
234235
}
236+
235237
```
236238

237239
从结果我们发现let mut y = x后,x并没有因为所有权move而出现不可访问错误。

13-closure/13-01-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 14.1 闭包的语法
1+
# 13.1 闭包的语法
22
## 基本形式
33
闭包看起来像这样:
44

27-attr-and-compiler-args/.#27-02-rustc-options.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

27-attr-and-compiler-args/27-02-rustc-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 2
1+
## 2 编译器参数
22

33
本章将介绍Rust编译器的参数。
44

0 commit comments

Comments
 (0)