3 ms·
> A tight summary by someone who understands all this would be appreciated by many readers, not just myself. A tight summary of all of it would be as long as t
by irahul 14y ago
> A tight summary by someone who understands all this would be appreciated by many readers, not just myself.
A tight summary of all of it would be as long as the article. However, the point about semicolons in Rust is:
1. ; is a separator, not a terminator.
2. a;b separates a and b.
3. a; is a special case which means a;nil(or whatever is the equivalent in Rust)
4. The last expression in a function will be the return value of the function.
5. If the last line in a function is "a", it returns a. If it's "a;", it returns nil(from 3)
- Scramblejams 14y agoPerfect, thank you.