Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
b6038b76
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b6038b76
编写于
5月 18, 2013
作者:
B
Brendan Zabarauskas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Return a reference to the tuple elements instead of copying
上级
5242464d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
92 addition
and
94 deletion
+92
-94
src/libcore/tuple.rs
src/libcore/tuple.rs
+92
-94
未找到文件。
src/libcore/tuple.rs
浏览文件 @
b6038b76
...
...
@@ -257,16 +257,14 @@ fn gt(&self, other: &(A, B, C)) -> bool { (*other).lt(&(*self)) }
}
)
+
)
=>
(
pub
mod
getters
{
use
kinds
::
Copy
;
$
(
pub
trait
$name
<
$
(
$T
),
+>
{
$
(
fn
$method
(
&
self
)
->
$T
;)
+
$
(
fn
$method
<
'a
>
(
&
'a
self
)
->
&
'a
$T
;)
+
})
+
$
(
impl
<
$
(
$T
:Copy
),
+>
$name
<
$
(
$T
),
+>
for
(
$
(
$T
),
+
)
{
$
(
impl
<
$
(
$T
),
+>
$name
<
$
(
$T
),
+>
for
(
$
(
$T
),
+
)
{
$
(
#[inline(always)]
fn
$method
(
&
self
)
->
$T
{
fn
$method
<
'a
>
(
&
'a
self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
c
}
fn
n3
->
D
{
(
_
,
_
,
_
,
ref
d
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
)
=>
d
}
fn
n4
->
E
{
(
_
,
_
,
_
,
_
,
ref
e
,
_
,
_
,
_
,
_
,
_
,
_
,
_
)
=>
e
}
fn
n5
->
F
{
(
_
,
_
,
_
,
_
,
_
,
ref
f
,
_
,
_
,
_
,
_
,
_
,
_
)
=>
f
}
fn
n6
->
G
{
(
_
,
_
,
_
,
_
,
_
,
_
,
ref
g
,
_
,
_
,
_
,
_
,
_
)
=>
g
}
fn
n7
->
H
{
(
_
,
_
,
_
,
_
,
_
,
_
,
_
,
ref
h
,
_
,
_
,
_
,
_
)
=>
h
}
fn
n8
->
I
{
(
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
ref
i
,
_
,
_
,
_
)
=>
i
}
fn
n9
->
J
{
(
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
ref
j
,
_
,
_
)
=>
j
}
fn
n10
->
K
{
(
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
ref
k
,
_
)
=>
k
}
fn
n11
->
L
{
(
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
_
,
ref
l
)
=>
l
}
}
)
...
...
@@ -415,16 +413,16 @@ fn test_clone() {
#[test]
fn
test_n_tuple
()
{
let
t
=
(
0u8
,
1u16
,
2u32
,
3u64
,
4u
,
5i8
,
6i16
,
7i32
,
8i64
,
9
i
,
10f32
,
11f64
);
assert_eq!
(
t
.n0
(),
0u8
);
assert_eq!
(
t
.n1
(),
1u16
);
assert_eq!
(
t
.n2
(),
2u32
);
assert_eq!
(
t
.n3
(),
3u64
);
assert_eq!
(
t
.n4
(),
4u
);
assert_eq!
(
t
.n5
(),
5i8
);
assert_eq!
(
t
.n6
(),
6i16
);
assert_eq!
(
t
.n7
(),
7i32
);
assert_eq!
(
t
.n8
(),
8i64
);
assert_eq!
(
t
.n9
(),
9
i
);
assert_eq!
(
t
.n10
(),
10f32
);
assert_eq!
(
t
.n11
(),
11f64
);
assert_eq!
(
*
t
.n0
(),
0u8
);
assert_eq!
(
*
t
.n1
(),
1u16
);
assert_eq!
(
*
t
.n2
(),
2u32
);
assert_eq!
(
*
t
.n3
(),
3u64
);
assert_eq!
(
*
t
.n4
(),
4u
);
assert_eq!
(
*
t
.n5
(),
5i8
);
assert_eq!
(
*
t
.n6
(),
6i16
);
assert_eq!
(
*
t
.n7
(),
7i32
);
assert_eq!
(
*
t
.n8
(),
8i64
);
assert_eq!
(
*
t
.n9
(),
9
i
);
assert_eq!
(
*
t
.n10
(),
10f32
);
assert_eq!
(
*
t
.n11
(),
11f64
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录