Skip to content

Commit 5c35a1b

Browse files
committed
---
yaml --- r: 46896 b: refs/heads/try c: 210fa2d h: refs/heads/master v: v3
1 parent a88d0cb commit 5c35a1b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3bbcac322669cff3abde5be937cc4ec3860f3985
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
5-
refs/heads/try: 1c487b18f3ff2ea55e377c3e8be99227c8257136
5+
refs/heads/try: 210fa2d0172c10112196e8fcf640e32ee54944fe
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcore/option.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ pub pure fn map_default<T, U>(opt: &r/Option<T>, def: U,
201201
}
202202
203203
#[inline(always)]
204-
pub pure fn iter<T>(opt: &Option<T>, f: fn(x: &T)) {
204+
pub pure fn iter<T>(opt: &r/Option<T>, f: fn(x: &r/T)) {
205205
//! Performs an operation on the contained value by reference
206206
match *opt { None => (), Some(ref t) => f(t) }
207207
}
@@ -313,7 +313,7 @@ impl<T> Option<T> {
313313
314314
/// Performs an operation on the contained value by reference
315315
#[inline(always)]
316-
pure fn iter(&self, f: fn(x: &T)) { iter(self, f) }
316+
pure fn iter(&self, f: fn(x: &self/T)) { iter(self, f) }
317317
318318
/**
319319
Gets an immutable reference to the value inside an option.

branches/try/src/libstd/treemap.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,18 +561,18 @@ impl <K: Ord, V> TreeNode<K, V> {
561561

562562
pure fn each<K: Ord, V>(node: &r/Option<~TreeNode<K, V>>,
563563
f: fn(&(&r/K, &r/V)) -> bool) {
564-
do node.map |x| {
564+
do node.iter |x| {
565565
each(&x.left, f);
566566
if f(&(&x.key, &x.value)) { each(&x.right, f) }
567-
};
567+
}
568568
}
569569

570570
pure fn each_reverse<K: Ord, V>(node: &r/Option<~TreeNode<K, V>>,
571571
f: fn(&(&r/K, &r/V)) -> bool) {
572-
do node.map |x| {
572+
do node.iter |x| {
573573
each_reverse(&x.right, f);
574574
if f(&(&x.key, &x.value)) { each_reverse(&x.left, f) }
575-
};
575+
}
576576
}
577577

578578
// Remove left horizontal link by rotating right

0 commit comments

Comments
 (0)