1
0
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:
Charisee Chiw 2023-01-23 18:37:03 -08:00 committed by Andrew Walbran
parent 585509bb0a
commit 1453e1d5bb

View File

@ -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>