Skip to content

Commit 043745c

Browse files
committed
Avoid the merge derive macro in rustbuild
The task of the macro is simple enough that a decl macro is almost ten times shorter than the original proc macro. The proc macro is 159 lines while the decl macro is just 18 lines. This reduces the amount of dependencies of rustbuild from 45 to 37. It also slight reduces compilation time from 47s to 44s for debug builds.
1 parent 2fe2728 commit 043745c

File tree

3 files changed

+197
-182
lines changed

3 files changed

+197
-182
lines changed

Cargo.lock

-16
Original file line numberDiff line numberDiff line change
@@ -2225,22 +2225,6 @@ name = "merge"
22252225
version = "0.1.0"
22262226
source = "registry+https://github.com/rust-lang/crates.io-index"
22272227
checksum = "10bbef93abb1da61525bbc45eeaff6473a41907d19f8f9aa5168d214e10693e9"
2228-
dependencies = [
2229-
"merge_derive",
2230-
"num-traits",
2231-
]
2232-
2233-
[[package]]
2234-
name = "merge_derive"
2235-
version = "0.1.0"
2236-
source = "registry+https://github.com/rust-lang/crates.io-index"
2237-
checksum = "209d075476da2e63b4b29e72a2ef627b840589588e71400a25e3565c4f849d07"
2238-
dependencies = [
2239-
"proc-macro-error",
2240-
"proc-macro2",
2241-
"quote",
2242-
"syn",
2243-
]
22442228

22452229
[[package]]
22462230
name = "minifier"

src/bootstrap/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ toml = "0.5"
4747
time = "0.1"
4848
ignore = "0.4.10"
4949
opener = "0.5"
50-
merge = "0.1.0"
50+
merge = { version = "0.1.0", default-features = false, features = ["std"] }
5151
once_cell = "1.7.2"
5252

5353
[target.'cfg(windows)'.dependencies.winapi]

0 commit comments

Comments
 (0)