3 ms·
I have never written a line of rust in my life but I assume that a statement that terminates with a value can be used as a rvalue in an assignment or other expr
by doctor_eval 4y ago
I have never written a line of rust in my life but I assume that a statement that terminates with a value can be used as a rvalue in an assignment or other expression.
So (I guess) both examples set the variable to 1.
- metaltyphoon 4y agoYes
- Donckele 4y agoThanks for that. That logic of the “break” keyword given a parameter is unusual compared to to other languages. Maybe it was a bad example to use.