Merge pull request #393 from cvubrugier/master

Fix two spelling errors in chapter 7
This commit is contained in:
Carol (Nichols || Goulding)
2017-01-09 12:05:15 -05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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 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 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 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. keeping your code organized.
In the same way that you extract lines of code into a function, you can extract 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 The call to `outermost::middle_function` will work. This is because
`middle_function` is public, and `try_me` is accessing `middle_function` `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. that this module is accessible.
The call to `outermost::middle_secret_function` will cause a compilation error. The call to `outermost::middle_secret_function` will cause a compilation error.