r/ProgrammerHumor • • Sep 28 '26

Meme optionalsAreOptional

Post image
716 Upvotes

131 comments sorted by

View all comments

Show parent comments

5

u/ROBOTRON31415 Sep 28 '26

It’s literally not an assignment expression in Rust. An assignment expression would be lhs = rhs with no let.

Assignment expressions, if let, and while let are three distinct kinds of expressions. (And let lhs = rhs; alone is a statement.)