Hacker News new | comments | ask | show | jobs | submit login
Rust tips and tricks for newcomers (thesquareplanet.com)
1 point by Jonhoo on Oct 21, 2016 | hide | past | web | favorite | 2 comments



In the first section "Returning values", you need a lifetime specifier like in this example: [1].

Thanks for sharing though, it's well written.

[1]: https://is.gd/6azJ2J


Good point -- it's not really relevant to the example that I'm using a borrow, so I changed it to a u64 instead.




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: