Fix: typo
This commit is contained in:
parent
e61beb9641
commit
36847dab91
1 changed files with 1 additions and 1 deletions
|
@ -546,7 +546,7 @@ fn main() {
|
||||||
{{< / highlight >}}
|
{{< / highlight >}}
|
||||||
|
|
||||||
Here, this piece of code works because _Rust_ copy the value of `i` into
|
Here, this piece of code works because _Rust_ copy the value of `i` into
|
||||||
`val` when calling the `priprint` function. All primitve type in _Rust_
|
`val` when calling the `priprint` function. All primitive types in _Rust_
|
||||||
works this way, but, if you want to pass, for example, a struct, _Rust_
|
works this way, but, if you want to pass, for example, a struct, _Rust_
|
||||||
will **move** the resource to the function. By **moving** a resource, you
|
will **move** the resource to the function. By **moving** a resource, you
|
||||||
**transfer** ownership to the receiver. So in the example below `priprint`
|
**transfer** ownership to the receiver. So in the example below `priprint`
|
||||||
|
|
Loading…
Reference in a new issue