chore: clarify collections documentation

C++ `map` is more like BTreeMap.

`unordered_map` in C++(11) is the equivalent of `HashMap` in Rust.
(+ additional like for references).
This commit is contained in:
Pascal H 2021-03-15 09:14:12 +01:00 committed by GitHub
parent ebdb66c7bf
commit 3bce2ef8d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ structures that are used very often in Rust programs:
* A *vector* allows you to store a variable number of values next to * A *vector* allows you to store a variable number of values next to
each other. each other.
* A *hash map* allows you to associate a value with a particular key. * A *hash map* allows you to associate a value with a particular key.
You may also know this by the names *map* in C++, *dictionary* in You may also know this by the names [*unordered map* in C++](https://en.cppreference.com/w/cpp/container/unordered_map),
Python or an *associative array* in other languages. [*dictionary* in Python](https://docs.python.org/3/tutorial/datastructures.html#dictionaries) or an *associative array* in other languages.
[Rust book chapter](https://doc.rust-lang.org/stable/book/ch08-01-vectors.html) [Rust book chapter](https://doc.rust-lang.org/stable/book/ch08-01-vectors.html)