Skip to content

Commit eed5ef7

Browse files
committed
---
yaml --- r: 48585 b: refs/heads/snap-stage3 c: 06a336a h: refs/heads/master i: 48583: 91fb8fc v: v3
1 parent 23ff2ee commit eed5ef7

File tree

2 files changed

+10
-28
lines changed

2 files changed

+10
-28
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 3bbcac322669cff3abde5be937cc4ec3860f3985
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 1cde7e6bc266af836e0695be7282257838eee05a
4+
refs/heads/snap-stage3: 06a336ae791ea8a8e618ff43a97b1e6e510c6601
55
refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/vec.rs

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,45 +2268,27 @@ pub mod bytes {
22682268

22692269
// ___________________________________________________________________________
22702270
// ITERATION TRAIT METHODS
2271-
//
2272-
// This cannot be used with iter-trait.rs because of the region pointer
2273-
// required in the slice.
22742271

22752272
impl<A> iter::BaseIter<A> for &self/[A] {
2276-
pub pure fn each(&self, blk: fn(v: &A) -> bool) {
2277-
// FIXME(#2263)---should be able to call each(self, blk)
2278-
for each(*self) |e| {
2279-
if (!blk(e)) {
2280-
return;
2281-
}
2282-
}
2283-
}
2273+
#[inline(always)]
2274+
pure fn each(&self, blk: fn(v: &'self A) -> bool) { each(*self, blk) }
2275+
#[inline(always)]
22842276
pure fn size_hint(&self) -> Option<uint> { Some(len(*self)) }
22852277
}
22862278

22872279
// FIXME(#4148): This should be redundant
22882280
impl<A> iter::BaseIter<A> for ~[A] {
2289-
pub pure fn each(&self, blk: fn(v: &A) -> bool) {
2290-
// FIXME(#2263)---should be able to call each(self, blk)
2291-
for each(*self) |e| {
2292-
if (!blk(e)) {
2293-
return;
2294-
}
2295-
}
2296-
}
2281+
#[inline(always)]
2282+
pure fn each(&self, blk: fn(v: &'self A) -> bool) { each(*self, blk) }
2283+
#[inline(always)]
22972284
pure fn size_hint(&self) -> Option<uint> { Some(len(*self)) }
22982285
}
22992286

23002287
// FIXME(#4148): This should be redundant
23012288
impl<A> iter::BaseIter<A> for @[A] {
2302-
pub pure fn each(&self, blk: fn(v: &A) -> bool) {
2303-
// FIXME(#2263)---should be able to call each(self, blk)
2304-
for each(*self) |e| {
2305-
if (!blk(e)) {
2306-
return;
2307-
}
2308-
}
2309-
}
2289+
#[inline(always)]
2290+
pure fn each(&self, blk: fn(v: &'self A) -> bool) { each(*self, blk) }
2291+
#[inline(always)]
23102292
pure fn size_hint(&self) -> Option<uint> { Some(len(*self)) }
23112293
}
23122294

0 commit comments

Comments
 (0)