From 73d40c30b5153baef5214b41bd5fcfffe1e08b89 Mon Sep 17 00:00:00 2001 From: Alexis Beingessner Date: Tue, 9 Dec 2014 14:00:58 -0500 Subject: [PATCH 1/3] Update 0000-collections-reform-part-2.md --- text/0000-collections-reform-part-2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text/0000-collections-reform-part-2.md b/text/0000-collections-reform-part-2.md index de146a5985..9a2f16668e 100644 --- a/text/0000-collections-reform-part-2.md +++ b/text/0000-collections-reform-part-2.md @@ -294,7 +294,7 @@ pub fn as_slices(&'a self) -> (&'a [T], &'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 seemed to simply be the nicest. @@ -303,4 +303,4 @@ The one settled on seemed to simply be the nicest. `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 \ No newline at end of file +[part1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md From e6b8bc0e6b343f61c0dbe414869e5495f7bdd97b Mon Sep 17 00:00:00 2001 From: Alexis Beingessner Date: Tue, 9 Dec 2014 15:44:12 -0500 Subject: [PATCH 2/3] Update 0000-collections-reform-part-2.md --- text/0000-collections-reform-part-2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-collections-reform-part-2.md b/text/0000-collections-reform-part-2.md index 9a2f16668e..d3961f8e16 100644 --- a/text/0000-collections-reform-part-2.md +++ b/text/0000-collections-reform-part-2.md @@ -188,7 +188,7 @@ Based on feedback and collections reform landing, this RFC proposes the followin ``` impl Map { - fn entry>(&'a mut self, key: &O) -> Entry<'a, O, V> + fn entry<'a, O: ToOwned>(&'a mut self, key: &O) -> Entry<'a, O, V> } pub enum Entry<'a, O: 'a, V: 'a> { From 6c45e05e8a268cc29cbabc347017eec3f49a091e Mon Sep 17 00:00:00 2001 From: Alexis Beingessner Date: Wed, 10 Dec 2014 09:19:30 -0500 Subject: [PATCH 3/3] Update 0000-collections-reform-part-2.md --- text/0000-collections-reform-part-2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-collections-reform-part-2.md b/text/0000-collections-reform-part-2.md index d3961f8e16..42b6eb62ef 100644 --- a/text/0000-collections-reform-part-2.md +++ b/text/0000-collections-reform-part-2.md @@ -197,7 +197,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> {