17cupsofcoffee / seventeencups.net

🌐 Source code for SeventeenCups.net
https://www.seventeencups.net
MIT License
3 stars 3 forks source link

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

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

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/

Spoonbender commented 3 years ago

Thank you! This has been very helpful!

oosubhisara commented 3 years ago

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

nsengupta commented 3 years ago

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

gernotpokorny commented 1 year ago

Very good article.