1
0
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:
Nicole LeGare
2025-02-26 16:48:45 -08:00
parent 241c28ed7e
commit cf4c04ea19

View File

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