Skip to content

Commit

Permalink
Remove Entry Deref
Browse files Browse the repository at this point in the history
  • Loading branch information
Gankra committed Dec 18, 2014
1 parent a5a655d commit 480eaa7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions text/0000-collections-reform-part-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,12 @@ impl<'a, K, V> VacantEntry<'a, K, V> {
}
impl<'a, K, V> OccupiedEntry<'a, K, V> {
fn get(&self) -> &V
fn get_mut(&mut self) -> &mut V
fn into_mut(self) -> &'a mut V
fn insert(&mut self, value: V) -> V
fn remove(self) -> V
}
impl Deref<V> for OccupiedEntry<'a, O, V>
impl DerefMut<V> for OccupiedEntry<'a, O, V>
```

Replacing get/get_mut with Deref is simply a nice ergonomic improvement. Renaming `set` and `take`
Expand Down

0 comments on commit 480eaa7

Please sign in to comment.