Merge pull request #1180 from yanggangtony/fix-crate-module

语句后面缺少一个分号;
pull/1181/head
Sunface 2 years ago committed by GitHub
commit da071c5ab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,7 +57,7 @@ pub fn eat_at_restaurant() {
- 需要引入同一个模块的多个函数
- 作用域中存在同名函数
在以上两种情况中,使用 `use front_of_house::hosting` 引入模块要比 `use front_of_house::hosting::add_to_waitlist;` 引入函数更好。
在以上两种情况中,使用 `use front_of_house::hosting;` 引入模块要比 `use front_of_house::hosting::add_to_waitlist;` 引入函数更好。
例如,如果想使用 `HashMap`,那么直接引入该结构体是比引入模块更好的选择,因为在 `collections` 模块中,我们只需要使用一个 `HashMap` 结构体:

Loading…
Cancel
Save