mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 18:54:32 -06:00
No more essence. anywhere. There is no essence.
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@
|
||||
- [Controlling visibility with `pub`](ch07-02-controlling-visibility-with-pub.md)
|
||||
- [Importing names with `use`](ch07-03-importing-names-with-use.md)
|
||||
|
||||
- [Essential Collections](ch08-00-essential-collections.md)
|
||||
- [Fundamental Collections](ch08-00-fundamental-collections.md)
|
||||
- [Vectors](ch08-01-vectors.md)
|
||||
- [Strings](ch08-02-strings.md)
|
||||
- [HashMaps](ch08-03-hashmaps.md)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Essential Collections
|
||||
# Fundamental Collections
|
||||
|
||||
Rust's standard library includes a number of really useful data structures
|
||||
called *collections*. Most other types represent one specific value, but
|
||||
@@ -1,6 +1,6 @@
|
||||
## HashMaps
|
||||
|
||||
The last of our essential collections is the *HashMap*. A `HashMap<K, V>`
|
||||
The last of our fundamental collections is the *HashMap*. A `HashMap<K, V>`
|
||||
stores a mapping of keys of type `K` to values of type `V`. It does this via a
|
||||
*hashing function*, which determines how it places these keys and values into
|
||||
memory. Many different programming languges support this kind of data
|
||||
@@ -25,7 +25,7 @@ map.insert(2, "world");
|
||||
```
|
||||
|
||||
Note that we need to `use` the `HashMap` from the collections portion of the
|
||||
standard library. Of our three essential collections, this one is the least
|
||||
standard library. Of our three fundamental collections, this one is the least
|
||||
often used, so it has a bit less support from the language. There's no built-in
|
||||
macro to construct them, for example, and they're not in the prelude, so we
|
||||
need to add a `use` statement for them.
|
||||
|
||||
Reference in New Issue
Block a user