Rust tips is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Rust tips @rust

iterators are evaluated lazily, so they don't do anything until they're used to produce a value (e.g. `next()`, `collect()`, `count()` or `for i in iter {}`)

There's no "for_each()" method to just run an iterator without getting values out of it. Use `for _ in iter {}` instead.

· Web · 2 · 4