#019 Aug 18, 2022option iterator19. breaking from labeled blocksAs of 1.65, it is possible to label plain block expression and terminate that block early. 1 2 3 4 5 6 7 8 9 10 11 let result = 'block: { let result = 20i32; if result < 10 { break 'block 1; } if result > 10 { break 'block 2; } 3 }; assert_eq!(result, 2); This post is licensed under CC BY 4.0 by the author.Share: ← Previous 18. flatten options Next → 20. let-else statements