Skip to content

Commit 4bfddb9

Browse files
committed
---
yaml --- r: 30895 b: refs/heads/incoming c: f1014c4 h: refs/heads/master i: 30893: d224abf 30891: f2e1f8e 30887: 8fb2079 30879: ef92e98 v: v3
1 parent 8fc3b20 commit 4bfddb9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: d0333a8e414e510dace81c4d6fc40a0c77c11ea7
9+
refs/heads/incoming: f1014c43fd4e22fa1a8190e642e05dc6891d6eaa
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libcore/iter.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ pure fn build_sized_opt<A,B: Buildable<A>>(
248248
// Functions that combine iteration and building
249249

250250
/// Apply a function to each element of an iterable and return the results
251-
fn map<T,IT: BaseIter<T>,U,BU: Buildable<U>>(v: IT, f: fn(T) -> U) -> BU {
251+
fn map<T,IT: BaseIter<T>,U,BU: Buildable<U>>(v: &IT, f: fn(&T) -> U) -> BU {
252252
do build_sized_opt(v.size_hint()) |push| {
253253
for v.each() |elem| {
254-
push(f(*elem));
254+
push(f(elem));
255255
}
256256
}
257257
}
@@ -275,17 +275,17 @@ pure fn from_fn<T,BT: Buildable<T>>(n_elts: uint, op: InitOp<T>) -> BT {
275275
* Creates an immutable vector of size `n_elts` and initializes the elements
276276
* to the value `t`.
277277
*/
278-
pure fn from_elem<T: Copy,BT: Buildable<T>>(n_elts: uint, t: T) -> BT {
278+
pure fn from_elem<T: Copy,BT: Buildable<T>>(n_elts: uint, +t: T) -> BT {
279279
do build_sized(n_elts) |push| {
280-
let mut i: uint = 0u;
281-
while i < n_elts { push(t); i += 1u; }
280+
let mut i: uint = 0;
281+
while i < n_elts { push(t); i += 1; }
282282
}
283283
}
284284

285285
/// Appending two generic sequences
286286
#[inline(always)]
287287
pure fn append<T: Copy,IT: BaseIter<T>,BT: Buildable<T>>(
288-
lhs: IT, rhs: IT) -> BT {
288+
lhs: &IT, rhs: &IT) -> BT {
289289
let size_opt = lhs.size_hint().chain_ref(
290290
|sz1| rhs.size_hint().map(|sz2| *sz1+*sz2));
291291
do build_sized_opt(size_opt) |push| {
@@ -298,7 +298,7 @@ pure fn append<T: Copy,IT: BaseIter<T>,BT: Buildable<T>>(
298298
/// type of sequence.
299299
#[inline(always)]
300300
pure fn copy_seq<T: Copy,IT: BaseIter<T>,BT: Buildable<T>>(
301-
v: IT) -> BT {
301+
v: &IT) -> BT {
302302
do build_sized_opt(v.size_hint()) |push| {
303303
for v.each |x| { push(*x); }
304304
}

0 commit comments

Comments
 (0)