mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-01-23 07:20:20 +08:00
Fix two spelling errors in chapter 7
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
This commit is contained in:
parent
da18e98e94
commit
748d8404d2
@ -5,7 +5,7 @@ When you start writing programs in Rust, your code might live solely in the
|
||||
into other functions, both for re-use and for better organization. By splitting
|
||||
your code up into smaller chunks, each chunk is easier to understand on its
|
||||
own. But what happens if you find yourself with too many functions? Rust has a
|
||||
module system that handles the problem of wanting to to re-use code while
|
||||
module system that handles the problem of wanting to re-use code while
|
||||
keeping your code organized.
|
||||
|
||||
In the same way that you extract lines of code into a function, you can extract
|
||||
|
@ -263,7 +263,7 @@ is allowed to access the `outermost` module since `outermost` is in the current
|
||||
|
||||
The call to `outermost::middle_function` will work. This is because
|
||||
`middle_function` is public, and `try_me` is accessing `middle_function`
|
||||
through its parent module, `outermost` We determined in the previous paragraph
|
||||
through its parent module, `outermost`. We determined in the previous paragraph
|
||||
that this module is accessible.
|
||||
|
||||
The call to `outermost::middle_secret_function` will cause a compilation error.
|
||||
|
Loading…
Reference in New Issue
Block a user