Skip to content

Commit a86f556

Browse files
committed
Add a couple lines describing differences between into_mut/get_mut.
1 parent ed1a8ff commit a86f556

File tree

1 file changed

+9
-0
lines changed
  • src/libstd/collections/hash

1 file changed

+9
-0
lines changed

src/libstd/collections/hash/map.rs

+9
Original file line numberDiff line numberDiff line change
@@ -2250,6 +2250,11 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
22502250

22512251
/// Gets a mutable reference to the value in the entry.
22522252
///
2253+
/// If you need a reference to the `OccupiedEntry` which may outlive the
2254+
/// destruction of the `Entry` value, see [`into_mut`].
2255+
///
2256+
/// [`into_mut`]: #method.into_mut
2257+
///
22532258
/// # Examples
22542259
///
22552260
/// ```
@@ -2278,6 +2283,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
22782283
/// Converts the OccupiedEntry into a mutable reference to the value in the entry
22792284
/// with a lifetime bound to the map itself.
22802285
///
2286+
/// If you need multiple references to the `OccupiedEntry`, see [`get_mut`].
2287+
///
2288+
/// [`get_mut`]: #method.get_mut
2289+
///
22812290
/// # Examples
22822291
///
22832292
/// ```

0 commit comments

Comments
 (0)