language-to-rust-cheat-sheets icon indicating copy to clipboard operation
language-to-rust-cheat-sheets copied to clipboard

Fill in many of the missing Rust examples

Open theastrallyforged opened this issue 6 years ago • 3 comments

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).

theastrallyforged avatar Jul 27 '18 12:07 theastrallyforged