language-to-rust-cheat-sheets
language-to-rust-cheat-sheets copied to clipboard
Fill in many of the missing Rust examples
An alarming number of sections have JavaScript snippets, but no snippets showing the corresponding Rust idioms. This PR cuts that number (roughly) in half. :)
Specifically, it adds Rust snippets for the following sections which had JavaScript but no Rust snippets:
- some
- every
- find and findIndex
- fill
- entries and keys
- includes
- Iterating over the elements in a list
- Array.from(iterator)
- Object literals
- Maps
- Set
- Template strings
- Modules
- Destructuring
- Array comprehension
It also adds empty lines to some of the JavaScript examples to help show where the setup ends and the heart of the example begins (the added Rust examples have empty lines at the corresponding points).