From ba7b12f2b0a38c43a24438b8c9f6b599c6b8b408 Mon Sep 17 00:00:00 2001 From: Luc Street Date: Tue, 3 Jan 2017 19:08:40 -0800 Subject: [PATCH] Fix a pesky type error ``` error[E0308]: mismatched types --> src/ch08-03-hash-maps.md:44:15 | 44 | keys of type `&str` and values of type `i32`. Like vectors, hash maps are | ^ expected struct `std::string::String`, found &str | = note: to fix, merge this pull request ``` --- src/ch08-03-hash-maps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch08-03-hash-maps.md b/src/ch08-03-hash-maps.md index 936d19979..4721f7130 100644 --- a/src/ch08-03-hash-maps.md +++ b/src/ch08-03-hash-maps.md @@ -41,7 +41,7 @@ in the prelude. Hash maps also have less support from the standard library; there's no built-in macro to construct them, for example. Just like vectors, hash maps store their data on the heap. This `HashMap` has -keys of type `&str` and values of type `i32`. Like vectors, hash maps are +keys of type `String` and values of type `i32`. Like vectors, hash maps are homogeneous: all of the keys must have the same type, and all of the values must have the same type.