Skip to content

Commit b5cea4c

Browse files
committed
---
yaml --- r: 62476 b: refs/heads/snap-stage3 c: ee4d11f h: refs/heads/master v: v3
1 parent 5b5e6f6 commit b5cea4c

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ce1e211eeb607fdc131cedc764ccb7d824b28b70
4+
refs/heads/snap-stage3: ee4d11f37ea3f1bff8103c0e6b369a972f4b1bf2
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,28 @@ pub trait CopyableTuple<T, U> {
2222
}
2323

2424
impl<T:Copy,U:Copy> CopyableTuple<T, U> for (T, U) {
25-
2625
/// Return the first element of self
2726
#[inline(always)]
2827
fn first(&self) -> T {
29-
let (t, _) = *self;
30-
return t;
28+
match *self {
29+
(t, _) => t,
30+
}
3131
}
3232

3333
/// Return the second element of self
3434
#[inline(always)]
3535
fn second(&self) -> U {
36-
let (_, u) = *self;
37-
return u;
36+
match *self {
37+
(_, u) => u,
38+
}
3839
}
3940

4041
/// Return the results of swapping the two elements of self
4142
#[inline(always)]
4243
fn swap(&self) -> (U, T) {
43-
let (t, u) = *self;
44-
return (u, t);
44+
match *self {
45+
(t, u) => (u, t),
46+
}
4547
}
4648
}
4749

0 commit comments

Comments
 (0)