Skip to content

Commit

Permalink
Add a couple lines describing differences between into_mut/get_mut.
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Jun 2, 2018
1 parent ed1a8ff commit a86f556
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libstd/collections/hash/map.rs
Expand Up @@ -2250,6 +2250,11 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {

/// Gets a mutable reference to the value in the entry.
///
/// If you need a reference to the `OccupiedEntry` which may outlive the
/// destruction of the `Entry` value, see [`into_mut`].
///
/// [`into_mut`]: #method.into_mut
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -2278,6 +2283,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
/// Converts the OccupiedEntry into a mutable reference to the value in the entry
/// with a lifetime bound to the map itself.
///
/// If you need multiple references to the `OccupiedEntry`, see [`get_mut`].
///
/// [`get_mut`]: #method.get_mut
///
/// # Examples
///
/// ```
Expand Down

0 comments on commit a86f556

Please sign in to comment.