Coming soon…
As of 1.65, it is possible to label plain block expression and terminate that block early. let result = 'block: { let result = 20i32; if result < 10 { break 'block 1; } ...
As of 1.65, it is possible to use let statement with a refutable pattern. let result: Result<i32, ()> = Ok(20); let Ok(value) = result else { panic!("Heeeelp!!!"); }; assert_eq!(value, 2...
Sometimes there is a need to zip two iterables of various lengths. If it is known which one is longer, then use the following approach: First one must be longer. let nums1 = [1, 2, 3, 4]; let nu...
Implementing custom iterators
-
A new version of content is available.