Learning Rust: If Let vs. Match
http://patshaughnessy.net/2018/1/18/learning-rust-if-let-vs--match [patshaughnessy.net]
2018-01-18 19:41
This intrigued me. The phrase “syntactic sugar” implies the two code snippets don’t only produce the same results, it means the compiler generates exactly the same code in each case. Does the Rust compiler really generate exactly the same code for if let as it does for match? Read on to find out.