17cupsofcoffee/seventeencups.net

https://www.seventeencups.net/posts/why-if-let/

Opened this issue · 4 comments

Why Did Rust Pick the 'If Let' Syntax? - Joe Clay

One of my favourite features of Rust is that it has excellent support for pattern matching. This is usually done through match expressions, but there is also a shorter syntax that can be used if you only need a single branch, which is called if let.
If yo…

https://www.seventeencups.net/posts/why-if-let/

Thank you! This has been very helpful!

Thanks very much. It was rather confusing when I saw it in an egui-tetra example.

Now that you show the deconstruction part, it begins to make sense. Thanks.

Very good article.