Comment by josephg
15 hours ago
The rust standard library is excellent. Start more or less anywhere, and click "view source". Or open up the source code files on github.
There's often a lot more comments than code, which is kind of annoying. But it really is the best way to learn how a lot of good rust is written.
Vec is a good read: https://doc.rust-lang.org/src/alloc/vec/mod.rs.html
Here's the lovely slice::binary_search_by: https://doc.rust-lang.org/src/core/slice/mod.rs.html#2967-29...
No comments yet
Contribute on Hacker News ↗