Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How can I tell whether my Rust code is idiomatic, and what resources help beginners write more “Rusty” code?

Rust for Rustaceans does a pretty good job. I'd personally recommend the free Rust By Example.

I'd also recommend posting your code somewhere public and someone is sure to correct you. Hopefully nicely!

With that said:

  • Prefer "it works" over "it's perfect". The goal is to actually get something done.
  • If you like loops more than iterators: use loops!