@@ -222,7 +222,7 @@ Based on feedback and collections reform landing, this RFC proposes the followin
222222
223223```
224224impl Map<K, V> {
225- fn entry<O: ToOwned<K>>(&'a mut self, key: &O) -> Entry<'a, O, V>
225+ fn entry<'a, O: ToOwned<K>>(&'a mut self, key: &O) -> Entry<'a, O, V>
226226}
227227
228228pub enum Entry<'a, O: 'a, V: 'a> {
@@ -231,7 +231,7 @@ pub enum Entry<'a, O: 'a, V: 'a> {
231231}
232232
233233impl Entry<'a, O: 'a, V:'a> {
234- get(self) -> Result<&'a mut V, VacantEntry<'a, O, V>>
234+ fn get(self) -> Result<&'a mut V, VacantEntry<'a, O, V>>
235235}
236236
237237impl<'a, K, V> VacantEntry<'a, K, V> {
@@ -335,7 +335,7 @@ enum RingBufSlice<'a, T> {
335335```
336336/// Gets a slice over all the elements in the RingBuf. This may require shifting
337337/// all the elements to make this possible.
338- pub fn to_slice(&'a self) -> &'a [T]
338+ pub fn to_slice(&mut self) -> &[T]
339339```
340340
341341The one settled on had the benefit of being the simplest. In particular, having the enum wasn't
@@ -346,4 +346,4 @@ to avoid code-duplication.
346346
347347` reserve_index ` vs ` reserve_len ` and ` Ringbuf::as_slice ` are the two major ones.
348348
349- [ part1 ] : https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
349+ [ part1 ] : https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
0 commit comments