Commit Graph

1144 Commits

Author SHA1 Message Date
Live4dreamCH
bf15d06e34
PR:修改7.4中pub use部分的表述
您好!我是rust的初学者,在阅读pub use部分时没有太理解,于是去读了这部分的英文原文,并尝试着修改,使这段更简单易懂。
这是我第一次PR,如有不妥请您多多谅解!
以下是我的验证代码,可以通过编译。
```rust
// 我们所导入的mod
mod front_of_house {
    pub mod hosting {
        pub fn add_to_waitlist() {}
    }
}

// 我们的mod
mod curr {
    pub use crate::front_of_house::hosting; // 重导出
    pub fn eat_at_restaurant() {
        hosting::add_to_waitlist();
    }
}

// 导入我们代码的mod
mod others {
    use crate::curr;
    pub fn others_fn() {
        curr::hosting::add_to_waitlist(); // 使用重导出
        curr::eat_at_restaurant();
    }
}

fn main() {
    others::others_fn();
    println!("Hello, world!");
}
```
2022-02-17 20:08:30 +08:00
KaiserY
6983d4e013 fix minted 2022-02-14 23:46:54 +08:00
AtomAlpaca
f2002a0445
fix ch02-00 2022-02-14 18:15:42 +08:00
KaiserY
91c7d02376 update to appendix-07 2022-02-10 23:01:01 +08:00
KaiserY
61292d1711 update to ch19-06 2022-02-10 16:52:17 +08:00
KaiserY
d7b0fa8065 update to ch18-03 2022-02-10 15:15:40 +08:00
KaiserY
5b156454d8 update to ch17-03 2022-02-10 14:30:38 +08:00
KaiserY
6493652a3b update to ch16-04 2022-02-10 13:28:50 +08:00
KaiserY
946f5d5fc0 update to ch15-06 2022-02-10 11:28:06 +08:00
KaiserY
be4f7e7281 update to ch14-05 2022-02-09 19:16:45 +08:00
KaiserY
0635f02553 update to ch13-04 2022-02-09 18:59:22 +08:00
KaiserY
324244de9b update to ch12-06 2022-02-09 16:54:09 +08:00
KaiserY
7e44e87a77 update to ch11-03 2022-02-09 10:16:09 +08:00
KaiserY
eaec47a9ed update to ch10-03 2022-02-08 10:27:36 +08:00
KaiserY
95a46e3bb8 update to ch09-03 2022-02-07 21:47:49 +08:00
manbucy
131256699c
Update appendix-02-operators.md
`%`  取模--> 取余
2022-02-07 16:26:07 +08:00
KaiserY
f625094908 update to ch08-03 2022-02-07 16:14:15 +08:00
KaiserY
4b0a9c80b2 update to ch07-05 2022-02-07 15:06:23 +08:00
KaiserY
f1b94ab927 update to ch06-03 2022-02-07 14:36:29 +08:00
KaiserY
7f827e9fab update to ch05-03 2022-02-07 11:37:16 +08:00
KaiserY
b1a0ca6e85 update to ch04-02 2022-02-06 23:46:50 +08:00
KaiserY
23278a0c39 update to ch03-05 2022-02-06 22:46:20 +08:00
KaiserY
951f1df20b Merge branch 'master' into main 2022-02-06 16:59:06 +08:00
KaiserY
956996e0e8 add listings code && update to ch02-00 2022-02-06 16:43:51 +08:00
tanliwei
4343fff9c8
fix a typo
fix a typo
2022-02-03 08:52:59 +08:00
Liming Jin
54b2342e85
update appendix-04: replace rls to rust-analyzer 2022-01-22 16:47:27 +08:00
KaiserY
a62de9ef02
Merge pull request #579 from mnixry/patch-1
Fix some untranslated `Filename:`
2022-01-13 19:24:33 +08:00
Mix
95c930ba95 fix some untranslated Filename: 2022-01-13 19:15:05 +08:00
Liming Jin
4024a81432
update ch05-03 2022-01-11 18:14:29 +08:00
KaiserY
397642d565
Merge pull request #577 from jinliming2/update-ch05-02
update ch05-02
2022-01-11 14:22:19 +08:00
Liming Jin
871911b4a2
update ch05-02 2022-01-11 13:47:03 +08:00
Sefank
3188f7a784
Update title-page.md to V2021-12-24
Signed-off-by: Sefank <12670778+Sefank@users.noreply.github.com>
2022-01-10 18:38:33 +08:00
Yunli Liu
429cfa4222
fix: runtime penalty 运行时损耗
The number of times that Deref::deref needs to be inserted is resolved at compile time, so there is no runtime penalty for taking advantage of deref coercion!
这些解析都发生在编译时,所以利用 Deref 强制转换并没有运行时损耗!
2022-01-09 17:13:13 +08:00
makisevon
317b7ab3be
fix: tiny mistakes 2022-01-08 17:39:04 +08:00
kyle
f5045a2147
fixed typo
fixed typo
2022-01-07 09:33:27 +08:00
KaiserY
fc425b84f0
update ch05-01 fix typo 2021-12-29 15:39:57 +08:00
KaiserY
f8d9ba1dc2
update ch05-02 close #571 2021-12-29 14:14:58 +08:00
KaiserY
38585e1621
update ch05-01 close #570 2021-12-29 14:11:06 +08:00
Vanilla
6d4849235b
[F] ch05-03-method-syntax.md: Typo "他" -> "它". 2021-12-24 16:40:05 +08:00
MacTavish Lee
63d11a44c6
Update ch03-01-variables-and-mutability.md
翻译较为生硬,用`但`阅读起来并不通顺,这里的意思是改变类型还能继续用这个变量名,用`并且`更为合适。
2021-12-23 14:53:36 +08:00
Rawlence
d6bb9b4c5e update ch-03-03-how-functions-work 2021-12-14 23:22:31 +08:00
Rawlence
f55b036d47 update ch03-02-data-type 2021-12-14 23:22:31 +08:00
Rawlence
7a7630e086 update ch03-01-variables-and-mutability 2021-12-05 11:51:46 +08:00
Rawlence
f22d7d9d96 update to the latest document(2021-12-05) 2021-12-05 02:02:24 +08:00
KaiserY
9b9406500f
Merge pull request #564 from sihuan/main
update ch06-02-match.md
2021-12-01 18:05:58 +08:00
SiHuan
f421a2a4ed
update ch06-02-match.md 2021-12-01 16:35:29 +08:00
boholder
7352dade75 Optimize confusing descriptions in ch17-03-oo-design-patterns.md 2021-12-01 16:23:15 +08:00
ardxwe
fc984cccf4 update comments 2021-12-01 11:44:57 +08:00
AiHao
dbd823ccd2 chore: fix the redundant field interpretation 2021-11-28 21:38:58 +08:00
A1lo
7aa71fe6d8
fix: response with correct HTTP/1.x Message format
The correct `HTTP/1.x Message`'s headers are followed after the `start-line` which describing the requests to be implemented. After the `headers` is a `blank line` indicating all `meta-information` for the request has been sent. Then the `optional body` is followed.
Increase HTTP buffer size to 1024(keep the same with the buffer size in `ch20-01-single-threaded.md`).
2021-11-09 14:47:00 +08:00