mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-05 16:10:31 +02:00
Update blocks.md
This commit is contained in:
parent
585509bb0a
commit
1453e1d5bb
@ -36,3 +36,11 @@ fn main() {
|
||||
```
|
||||
|
||||
However if the last expression ends with `;`, then the resulting value and type is `()`.
|
||||
|
||||
<details>
|
||||
|
||||
Key Points:
|
||||
* The point of this slide is to show that blocks have a type and value in Rust.
|
||||
* You can show how the value of the block changes by changing the last line in the block. For instance, adding/removing a semicolon or using a `return`.
|
||||
|
||||
</details>
|
||||
|
Loading…
Reference in New Issue
Block a user