Skip to content

Commit

Permalink
Merge branch 'collections2' of https://github.com/Gankro/rfcs into co…
Browse files Browse the repository at this point in the history
…llections2
  • Loading branch information
Gankra committed Dec 12, 2014
2 parents 3a3ddcc + 6c45e05 commit 994e525
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions text/0000-collections-reform-part-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Based on feedback and collections reform landing, this RFC proposes the followin

```
impl Map<K, V> {
fn entry<O: ToOwned<K>>(&'a mut self, key: &O) -> Entry<'a, O, V>
fn entry<'a, O: ToOwned<K>>(&'a mut self, key: &O) -> Entry<'a, O, V>
}
pub enum Entry<'a, O: 'a, V: 'a> {
Expand All @@ -231,7 +231,7 @@ pub enum Entry<'a, O: 'a, V: 'a> {
}
impl Entry<'a, O: 'a, V:'a> {
get(self) -> Result<&'a mut V, VacantEntry<'a, O, V>>
fn get(self) -> Result<&'a mut V, VacantEntry<'a, O, V>>
}
impl<'a, K, V> VacantEntry<'a, K, V> {
Expand Down Expand Up @@ -335,7 +335,7 @@ enum RingBufSlice<'a, T> {
```
/// Gets a slice over all the elements in the RingBuf. This may require shifting
/// all the elements to make this possible.
pub fn to_slice(&'a self) -> &'a [T]
pub fn to_slice(&mut self) -> &[T]
```

The one settled on had the benefit of being the simplest. In particular, having the enum wasn't
Expand All @@ -346,4 +346,4 @@ to avoid code-duplication.

`reserve_index` vs `reserve_len` and `Ringbuf::as_slice` are the two major ones.

[part1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
[part1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md

0 comments on commit 994e525

Please sign in to comment.