diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2018-06-02 19:55:09 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-02 19:55:09 -0600 |
| commit | a689b2d8acd09eed0e471ff75ae301e49b4c436e (patch) | |
| tree | 18c029ea13d8450baef086c05ca16c3066eb4a67 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 5bbe1ebe00428b77708c4d29989be09963ee2880 (diff) | |
| parent | dd88f88c02c901dd14e18a65c0b7132c36f530ee (diff) | |
| download | rust-a689b2d8acd09eed0e471ff75ae301e49b4c436e.tar.gz rust-a689b2d8acd09eed0e471ff75ae301e49b4c436e.zip | |
Rollup merge of #51312 - frewsxcv:clarify-hash-map-entry-get-mut, r=dtolnay
Clarify the difference between get_mut and into_mut for OccupiedEntry The examples for both hash_map::OccupiedEntry::get_mut and hash_map::OccupiedEntry::into_mut were almost identical. This led to some confusion over the difference, namely why you would ever use get_mut when into_mut gives alonger lifetime. Reddit thread: https://www.reddit.com/r/rust/comments/8a5swr/why_does_hashmaps This commit adds two lines and a comment to the example, to show that the entry object can be re-used after calling get_mut. Closes https://github.com/rust-lang/rust/issues/49745
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
