this post was submitted on 26 Jan 2023
8 points (100.0% liked)
Rust Programming
8431 readers
21 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yeah, in inline functions, you have to use implicit returns, whereas in regular/named functions, you have to use explicit returns.
Although, there is yet another special case to that rule in that you can use labeled explicit returns in inline functions like so: