You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-16 14:17:34 +02:00
Add speaker note about returning values from loop
This commit is contained in:
@ -21,4 +21,9 @@ fn main() {
|
||||
- The `loop` statement works like a `while true` loop. Use it for things like
|
||||
servers which will serve connections forever.
|
||||
|
||||
## More to Explore
|
||||
|
||||
- `loop` is the only form of loop that can return a value. If students are
|
||||
curious, demonstrate breaking with a value, e.g. `break x + 10`.
|
||||
|
||||
</details>
|
||||
|
Reference in New Issue
Block a user