diff options
| author | Phlosioneer <mattmdrr2@gmail.com> | 2018-04-06 15:32:54 -0400 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2018-06-02 15:51:39 -0400 |
| commit | 1bc6c4b10e7036be6fe61999fabf3462eeed39be (patch) | |
| tree | 1696cd63f6c7acdca92cb7cded87a7b195ef1d06 /src/test/incremental/thinlto | |
| parent | 4ecf12bf0eb8386626ccdb5f721a7183ccc4eba6 (diff) | |
| download | rust-1bc6c4b10e7036be6fe61999fabf3462eeed39be.tar.gz rust-1bc6c4b10e7036be6fe61999fabf3462eeed39be.zip | |
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.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
