#016 Jun 10, 2022option result matching16. Option/Result match?!Try to avoid matching Option or Result.Use if let instead. 1 2 3 4 5 6 7 8 9 10 11 12 let result = Some(111); // Not nice match result { Some(x) => println!("{x}"), None => {} }; // Better if let Some(x) = result { println!("{x}"); } This post is licensed under CC BY 4.0 by the author.Share: ← Previous 14. Find index of item Next → 18. flatten options