File tree Expand file tree Collapse file tree 2 files changed +24
-21
lines changed Expand file tree Collapse file tree 2 files changed +24
-21
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 97bcb2024440935f5e9ba2ac6116dc1ac8702824
2
+ refs/heads/master: ffc9fff720c33776d681034b7b7c8d920b2d6a15
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ impl extensions<A> for dvec<A> {
129
129
#[ doc = "Overwrite the current contents" ]
130
130
fn set ( +w : [ mut A ] ) {
131
131
self . check_not_borrowed ( ) ;
132
- self . data <- w; //FIXME check for recursive use
132
+ self . data <- w; //FIXME check for recursive use (#2607)
133
133
}
134
134
}
135
135
@@ -177,25 +177,28 @@ impl extensions<A:copy> for dvec<A> {
177
177
}
178
178
}
179
179
180
- //FIXME--
181
- //#[doc = "
182
- // Append all elements of an iterable.
183
- //
184
- // Failure will occur if the iterable's `each()` method
185
- // attempts to access this vector.
186
- //"]
187
- //fn append_iter<I:iter::base<A>>(ts: I) {
188
- // self.data.swap { |v|
189
- // alt ts.size_hint() {
190
- // none {}
191
- // some(h) { vec::reserve(v, len(v) + h) }
192
- // }
193
- //
194
- // for ts.each { |t| v = v + [t] };
195
- //
196
- // v
197
- // }
198
- //}
180
+ #[ doc = "
181
+ Append all elements of an iterable.
182
+
183
+ Failure will occur if the iterable's `each()` method
184
+ attempts to access this vector.
185
+ " ]
186
+ fn append_iter < A , I : iter:: base_iter < A > > ( ts : I ) {
187
+ self . swap { |v|
188
+ let mut v = alt ts. size_hint ( ) {
189
+ none { v }
190
+ some( h) {
191
+ let len = v. len ( ) + h;
192
+ let mut v <- v;
193
+ vec:: reserve ( v , len ) ;
194
+ v
195
+ }
196
+ } ;
197
+
198
+ for ts. each { |t| v += [ t] } ;
199
+ v
200
+ }
201
+ }
199
202
200
203
#[ doc = "
201
204
Gets a copy of the current contents.
You can’t perform that action at this time.
0 commit comments