1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-27 03:01:03 +02:00

Miscellaneous minor improvements (#2370)

This commit is contained in:
Nicole L
2024-09-20 14:19:53 -07:00
committed by GitHub
parent aeb643f380
commit 2f9babd098
11 changed files with 57 additions and 37 deletions

View File

@ -67,11 +67,6 @@ fn main() {
- Alternatively HashMap can be built from any `Iterator` which yields key-value
tuples.
- We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make
examples easier. Using references in collections can, of course, be done, but
it can lead into complications with the borrow checker.
- Try removing `to_string()` from the example above and see if it still
compiles. Where do you think we might run into issues?
- This type has several "method-specific" return types, such as
`std::collections::hash_map::Keys`. These types often appear in searches of