Skip to content

Commit c798a60

Browse files
committed
---
yaml --- r: 73220 b: refs/heads/dist-snap c: ee4d11f h: refs/heads/master v: v3
1 parent 4d88a2b commit c798a60

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
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: ce1e211eeb607fdc131cedc764ccb7d824b28b70
10+
refs/heads/dist-snap: ee4d11f37ea3f1bff8103c0e6b369a972f4b1bf2
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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)