Minor spelling/grammar/usage fixes.
Note: "different to" is not exactly incorrect, but "different from" is more commonly accepted in both US and Commonwealth English, and also more consistent with other usage within this tutorial.
This commit is contained in:
parent
544516ac63
commit
1ac8b34ccd
1 changed files with 4 additions and 4 deletions
|
@ -2841,11 +2841,11 @@ use farm::cow;
|
|||
|
||||
The path you give to `use` is per default global, meaning relative to the crate root,
|
||||
no matter how deep the module hierarchy is, or whether the module body it's written in
|
||||
is contained in its own file (remember: files are irrelevant).
|
||||
is contained in its own file. (Remember: files are irrelevant.)
|
||||
|
||||
This is different to other languages, where you often only find a single import construct that combines the semantic
|
||||
This is different from other languages, where you often only find a single import construct that combines the semantic
|
||||
of `mod foo;` and `use`-statements, and which tend to work relative to the source file or use an absolute file path
|
||||
- Rubys `require` or C/C++'s `#include` come to mind.
|
||||
- Ruby's `require` or C/C++'s `#include` come to mind.
|
||||
|
||||
However, it's also possible to import things relative to the module of the `use`-statement:
|
||||
Adding a `super::` in front of the path will start in the parent module,
|
||||
|
@ -3025,7 +3025,7 @@ The nested `barn` module is private, but the `pub use` allows users
|
|||
of the module `farm` to access a function from `barn` without needing
|
||||
to know that `barn` exists.
|
||||
|
||||
In other words, you can use them to decouple an public api from their internal implementation.
|
||||
In other words, you can use it to decouple a public api from its internal implementation.
|
||||
|
||||
## Using libraries
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue