Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
ad6f98cd
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
ad6f98cd
编写于
1月 01, 2022
作者:
B
bjorn3
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove the merge dependency
上级
947e9483
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
10 deletion
+9
-10
Cargo.lock
Cargo.lock
+0
-7
src/bootstrap/Cargo.toml
src/bootstrap/Cargo.toml
+0
-1
src/bootstrap/config.rs
src/bootstrap/config.rs
+9
-2
未找到文件。
Cargo.lock
浏览文件 @
ad6f98cd
...
...
@@ -176,7 +176,6 @@ dependencies = [
"getopts",
"ignore",
"libc",
"merge",
"num_cpus",
"once_cell",
"opener",
...
...
@@ -2220,12 +2219,6 @@ dependencies = [
"autocfg",
]
[[package]]
name = "merge"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10bbef93abb1da61525bbc45eeaff6473a41907d19f8f9aa5168d214e10693e9"
[[package]]
name = "minifier"
version = "0.0.41"
...
...
src/bootstrap/Cargo.toml
浏览文件 @
ad6f98cd
...
...
@@ -47,7 +47,6 @@ toml = "0.5"
time
=
"0.1"
ignore
=
"0.4.10"
opener
=
"0.5"
merge
=
{
version
=
"0.1.0"
,
default-features
=
false
,
features
=
["std"]
}
once_cell
=
"1.7.2"
[target.'cfg(windows)'.dependencies.winapi]
...
...
src/bootstrap/config.rs
浏览文件 @
ad6f98cd
...
...
@@ -18,7 +18,6 @@
use
crate
::
flags
::{
Color
,
Flags
};
use
crate
::
util
::
exe
;
use
build_helper
::
t
;
use
merge
::
Merge
;
use
serde
::
Deserialize
;
macro_rules!
check_ci_llvm
{
...
...
@@ -334,6 +333,10 @@ struct TomlConfig {
profile
:
Option
<
String
>
,
}
trait
Merge
{
fn
merge
(
&
mut
self
,
other
:
Self
);
}
impl
Merge
for
TomlConfig
{
fn
merge
(
&
mut
self
,
...
...
@@ -357,6 +360,8 @@ fn do_merge<T: Merge>(x: &mut Option<T>, y: Option<T>) {
}
}
// We are using a decl macro instead of a derive proc macro here to reduce the compile time of
// rustbuild.
macro_rules!
derive_merge
{
(
$
(
#[
$
attr:meta]
)
*
struct
$name:ident
{
$
(
$field:ident
:
$field_ty:ty
,)
*
...
...
@@ -369,7 +374,9 @@ struct $name {
impl
Merge
for
$name
{
fn
merge
(
&
mut
self
,
other
:
Self
)
{
$
(
Merge
::
merge
(
&
mut
self
.
$field
,
other
.
$field
);
if
!
self
.
$field
.is_some
()
{
self
.
$field
=
other
.
$field
;
}
)
*
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录