Skip to content

Commit 1fb1b20

Browse files
committed
---
yaml --- r: 48734 b: refs/heads/snap-stage3 c: a49ccee h: refs/heads/master v: v3
1 parent e88f9e9 commit 1fb1b20

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
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: 73b253dc800efe9fa73edfed4663d175b667129b
4+
refs/heads/snap-stage3: a49ccee68efc7ec05e882e5929669108f65f74fa
55
refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/core.rc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ Implicitly, all crates behave as if they included the following prologue:
5656

5757
// On Linux, link to the runtime with -lrt.
5858
#[cfg(target_os = "linux")]
59-
#[doc(hidden)]
6059
pub mod linkhack {
6160
#[link_args="-lrustrt -lrt"]
6261
#[link_args = "-lpthread"]
@@ -253,7 +252,7 @@ pub mod rt;
253252
// A curious inner-module that's not exported that contains the binding
254253
// 'core' so that macro-expanded references to core::error and such
255254
// can be resolved within libcore.
256-
#[doc(hidden)]
255+
#[doc(hidden)] // FIXME #3538
257256
pub mod core {
258257
#[cfg(stage0)]
259258
pub const error : u32 = 1_u32;

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use ops::Add;
4646
use kinds::Copy;
4747
use util;
4848
use num::Zero;
49-
use iter::BaseIter;
49+
use iter::{BaseIter, MutableIter};
5050

5151
#[cfg(test)] use ptr;
5252
#[cfg(test)] use str;
@@ -323,6 +323,13 @@ impl<T> BaseIter<T> for Option<T> {
323323
}
324324
}
325325
326+
impl<T> MutableIter<T> for Option<T> {
327+
#[inline(always)]
328+
fn each_mut(&mut self, f: &fn(&'self mut T) -> bool) {
329+
match *self { None => (), Some(ref mut t) => { f(t); } }
330+
}
331+
}
332+
326333
pub impl<T> Option<T> {
327334
/// Returns true if the option equals `none`
328335
#[inline(always)]

branches/snap-stage3/src/libstd/treemap.rs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pure fn lt<K: Ord + TotalOrd, V>(a: &TreeMap<K, V>,
7272
}
7373
};
7474

75-
return a_len < b_len;
75+
a_len < b_len
7676
}
7777

7878
impl<K: Ord + TotalOrd, V> Ord for TreeMap<K, V> {
@@ -694,22 +694,13 @@ fn remove<K: TotalOrd, V>(node: &mut Option<~TreeNode<K, V>>,
694694

695695
skew(save);
696696

697-
match save.right {
698-
Some(ref mut right) => {
697+
for save.right.each_mut |right| {
699698
skew(right);
700-
match right.right {
701-
Some(ref mut x) => { skew(x) },
702-
None => ()
703-
}
704-
}
705-
None => ()
699+
for right.right.each_mut |x| { skew(x) }
706700
}
707701

708702
split(save);
709-
match save.right {
710-
Some(ref mut x) => { split(x) },
711-
None => ()
712-
}
703+
for save.right.each_mut |x| { split(x) }
713704
}
714705

715706
return removed;
@@ -718,7 +709,7 @@ fn remove<K: TotalOrd, V>(node: &mut Option<~TreeNode<K, V>>,
718709
}
719710

720711
*node = None;
721-
return true;
712+
true
722713
}
723714

724715
#[cfg(test)]

0 commit comments

Comments
 (0)