Is there any part of the Standard Library that really impresses you?

424 points palad1

I have been coding in Rust since the week where V1 came out, progressively spending more and more time with it to the point where it's now my daily driver.

In .Net, I had this habit of building utils / extension methods for type conversions and 'sugar' around enumerables, streams and futures, but with Rust, I've just been amazed by the versatility of the \\std::iter::Iterator::collect()\\\ method.

For example, create a hashmap from a vec:

let renamed_keyed: FnvHashMap<_, _> = all_renamed
  .iter()
  .map(|renamed| ((renamed.external_source_id, renamed.code.as_str()), renamed))
  .collect();

I can use the same method with a different projection to collect in another container. This would necessitate an extension method in C# per open generic type.