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.
So (I guess) both examples set the variable to 1.
That logic of the “break” keyword given a parameter is unusual compared to to other languages.
Maybe it was a bad example to use.