From 735957bca5563d9b9dbacc97efaa0c4e6957ea69 Mon Sep 17 00:00:00 2001 From: yanggang Date: Sat, 18 Mar 2023 18:59:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=AD=E5=8F=A5=E5=90=8E=E9=9D=A2=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=E4=B8=80=E4=B8=AA=E5=88=86=E5=8F=B7;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yanggang --- src/basic/crate-module/use.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/crate-module/use.md b/src/basic/crate-module/use.md index 8ff5d9da..2ae8148d 100644 --- a/src/basic/crate-module/use.md +++ b/src/basic/crate-module/use.md @@ -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` 结构体: