mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-02-02 15:28:40 +08:00
doc: Reformat content at ch07-04
This commit is contained in:
parent
c9c49457d7
commit
b2f55d94f6
@ -140,7 +140,7 @@ fn function2() -> IoResult<()> {
|
||||
|
||||
<span class="caption">示例 7-16: 使用 `as` 关键字重命名引入作用域的类型</span>
|
||||
|
||||
在第二个 `use` 语句中,我们选择 `IoResult` 作为 `std::io::Result` 的新名称,它与从 `std::fmt` 引入作用域的 `Result` 并不冲突。示例 7-15 和示例 7-16 都是惯用的,如何选择都取决于你!
|
||||
在第二个 `use` 语句中,我们选择 `IoResult` 作为 `std::io::Result` 的新名称,它与从 `std::fmt` 引入作用域的 `Result` 并不冲突。示例 7-15 和示例 7-16 都是惯用的,如何选择都取决于你!
|
||||
|
||||
### 使用 `pub use` 重导出名称
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user