You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-11-30 09:08:45 +02:00
Update blocks.md
This commit is contained in:
committed by
Andrew Walbran
parent
585509bb0a
commit
1453e1d5bb
@@ -36,3 +36,11 @@ fn main() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
However if the last expression ends with `;`, then the resulting value and type is `()`.
|
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>
|
||||||
|
|||||||
Reference in New Issue
Block a user