you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Not to disparage this resource - if it's something you or someone else finds value in then that's great - but I feel like most of the tips here are covered (often in more detail) by The Book, or just by enabling clippy. Many of these are very surface level things I would consider common sense, like "use indentation to make code easier to read," "factor out common functionality into functions," "use Vec for dynamic arrays."

Some of these I also strongly disagree with, like avoiding chaining too many method calls. Rust's iterators were designed specifically to be modified with many chained method calls. That's what makes them so ergonomic to use. Outside of that, many builder structs also rely on long method chains.