Skip to content

Commit 4c62d7e

Browse files
Rollup merge of rust-lang#57884 - GuillaumeGomez:update-minifier-array, r=QuietMisdreavus
Update minifier version Should fix rust-lang#57754 (at least it's a bit faster on my computer). The whole point of this update is to create a huge array instead of creating a lot of variables. r? @QuietMisdreavus
2 parents 2f2d61a + f978563 commit 4c62d7e

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
15031503

15041504
[[package]]
15051505
name = "minifier"
1506-
version = "0.0.26"
1506+
version = "0.0.28"
15071507
source = "registry+https://github.com/rust-lang/crates.io-index"
15081508
dependencies = [
15091509
"macro-utils 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2992,7 +2992,7 @@ dependencies = [
29922992
name = "rustdoc"
29932993
version = "0.0.0"
29942994
dependencies = [
2995-
"minifier 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
2995+
"minifier 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
29962996
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
29972997
"pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
29982998
"tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4066,7 +4066,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
40664066
"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16"
40674067
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
40684068
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
4069-
"checksum minifier 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f299df45afd73332044ea9f717c816a84fc90c8b631409abf339ba93642a7985"
4069+
"checksum minifier 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "3a2898502751dcc9d66b6fff57f3cf63cc91605e83e1a33515396f5027f8e4ca"
40704070
"checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649"
40714071
"checksum miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ad30a47319c16cde58d0314f5d98202a80c9083b5f61178457403dfb14e509c"
40724072
"checksum miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28edaef377517fd9fe3e085c37d892ce7acd1fbeab9239c5a36eec352d8a8b7e"

src/librustdoc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ path = "lib.rs"
99

1010
[dependencies]
1111
pulldown-cmark = { version = "0.1.2", default-features = false }
12-
minifier = "0.0.26"
12+
minifier = "0.0.28"
1313
tempfile = "3"
1414
parking_lot = "0.6.4"

src/librustdoc/html/render.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ themePicker.onblur = handleThemeButtonsBlur;
939939
if path.exists() {
940940
for line in BufReader::new(File::open(path)?).lines() {
941941
let line = line?;
942-
if for_search_index && line.starts_with("var r_") {
942+
if for_search_index && line.starts_with("var R") {
943943
variables.push(line.clone());
944944
// We need to check if the crate name has been put into a variable as well.
945945
let tokens = js::simple_minify(&line).apply(js::clean_tokens);
@@ -1299,8 +1299,9 @@ fn write_minify_replacer<W: Write>(
12991299
})
13001300
.apply(|f| {
13011301
// We add a backline after the newly created variables.
1302-
minifier::js::aggregate_strings_with_separation(
1302+
minifier::js::aggregate_strings_into_array_with_separation(
13031303
f,
1304+
"R",
13041305
Token::Char(ReservedChar::Backline),
13051306
)
13061307
})

0 commit comments

Comments
 (0)