diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-02-07 14:28:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-07 14:28:30 +0100 |
| commit | 4c62d7e6f1272e6ccedcd11b9885ceed7c14371d (patch) | |
| tree | e03e05691ac5ec42acf3b2ec4d8caa10d824a468 | |
| parent | 2f2d61a0f8ab5e260152f9c10a13aed71848d184 (diff) | |
| parent | f97856350cb3d390b23f30b7804f3fc6126740ac (diff) | |
| download | rust-4c62d7e6f1272e6ccedcd11b9885ceed7c14371d.tar.gz rust-4c62d7e6f1272e6ccedcd11b9885ceed7c14371d.zip | |
Rollup merge of #57884 - GuillaumeGomez:update-minifier-array, r=QuietMisdreavus
Update minifier version Should fix #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
| -rw-r--r-- | Cargo.lock | 6 | ||||
| -rw-r--r-- | src/librustdoc/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/render.rs | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/Cargo.lock b/Cargo.lock index 4cea89ea041..f135dd0170b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1503,7 +1503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "minifier" -version = "0.0.26" +version = "0.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "macro-utils 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2992,7 +2992,7 @@ dependencies = [ name = "rustdoc" version = "0.0.0" dependencies = [ - "minifier 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "minifier 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "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" "checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16" "checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" -"checksum minifier 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f299df45afd73332044ea9f717c816a84fc90c8b631409abf339ba93642a7985" +"checksum minifier 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "3a2898502751dcc9d66b6fff57f3cf63cc91605e83e1a33515396f5027f8e4ca" "checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649" "checksum miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ad30a47319c16cde58d0314f5d98202a80c9083b5f61178457403dfb14e509c" "checksum miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28edaef377517fd9fe3e085c37d892ce7acd1fbeab9239c5a36eec352d8a8b7e" diff --git a/src/librustdoc/Cargo.toml b/src/librustdoc/Cargo.toml index 4b421881db4..20d5e672a83 100644 --- a/src/librustdoc/Cargo.toml +++ b/src/librustdoc/Cargo.toml @@ -9,6 +9,6 @@ path = "lib.rs" [dependencies] pulldown-cmark = { version = "0.1.2", default-features = false } -minifier = "0.0.26" +minifier = "0.0.28" tempfile = "3" parking_lot = "0.6.4" diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 86fb51419c2..0b2e27eccff 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -939,7 +939,7 @@ themePicker.onblur = handleThemeButtonsBlur; if path.exists() { for line in BufReader::new(File::open(path)?).lines() { let line = line?; - if for_search_index && line.starts_with("var r_") { + if for_search_index && line.starts_with("var R") { variables.push(line.clone()); // We need to check if the crate name has been put into a variable as well. let tokens = js::simple_minify(&line).apply(js::clean_tokens); @@ -1299,8 +1299,9 @@ fn write_minify_replacer<W: Write>( }) .apply(|f| { // We add a backline after the newly created variables. - minifier::js::aggregate_strings_with_separation( + minifier::js::aggregate_strings_into_array_with_separation( f, + "R", Token::Char(ReservedChar::Backline), ) }) |
