Skip to content

Commit ee81107

Browse files
committed
---
yaml --- r: 60479 b: refs/heads/auto c: ee4d11f h: refs/heads/master i: 60477: 8b3b6b7 60475: 8c8e0b1 60471: 155e128 60463: a93544d 60447: 9e94be3 60415: 3e4adb0 v: v3
1 parent f144442 commit ee81107

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
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: ce1e211eeb607fdc131cedc764ccb7d824b28b70
17+
refs/heads/auto: ee4d11f37ea3f1bff8103c0e6b369a972f4b1bf2
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/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)