Skip to content

Commit 0bf81d3

Browse files
Update minifier-rs version
1 parent e649e90 commit 0bf81d3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Cargo.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ dependencies = [
16911691

16921692
[[package]]
16931693
name = "minifier"
1694-
version = "0.0.30"
1694+
version = "0.0.33"
16951695
source = "registry+https://github.com/rust-lang/crates.io-index"
16961696
dependencies = [
16971697
"macro-utils 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3218,7 +3218,7 @@ dependencies = [
32183218
name = "rustdoc"
32193219
version = "0.0.0"
32203220
dependencies = [
3221-
"minifier 0.0.30 (registry+https://github.com/rust-lang/crates.io-index)",
3221+
"minifier 0.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
32223222
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
32233223
"pulldown-cmark 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
32243224
"rustc-rayon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4458,7 +4458,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
44584458
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
44594459
"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425"
44604460
"checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed"
4461-
"checksum minifier 0.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "4c909e78edf61f3aa0dd2086da168cdf304329044bbf248768ca3d20253ec8c0"
4461+
"checksum minifier 0.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "70bf0db2475f5e627787da77ca52fe33c294063f49f4134b8bc662eedb5e7332"
44624462
"checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649"
44634463
"checksum miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ad30a47319c16cde58d0314f5d98202a80c9083b5f61178457403dfb14e509c"
44644464
"checksum miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28edaef377517fd9fe3e085c37d892ce7acd1fbeab9239c5a36eec352d8a8b7e"

src/librustdoc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010

1111
[dependencies]
1212
pulldown-cmark = { version = "0.5.3", default-features = false }
13-
minifier = "0.0.30"
13+
minifier = "0.0.33"
1414
rayon = { version = "0.2.0", package = "rustc-rayon" }
1515
tempfile = "3"
1616
parking_lot = "0.7"

src/librustdoc/html/render.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1322,13 +1322,13 @@ fn write_minify_replacer<W: Write>(
13221322
{
13231323
let tokens: Tokens<'_> = simple_minify(contents)
13241324
.into_iter()
1325-
.filter(|f| {
1325+
.filter(|(f, next)| {
13261326
// We keep backlines.
1327-
minifier::js::clean_token_except(f, &|c: &Token<'_>| {
1327+
minifier::js::clean_token_except(f, next, &|c: &Token<'_>| {
13281328
c.get_char() != Some(ReservedChar::Backline)
13291329
})
13301330
})
1331-
.map(|f| {
1331+
.map(|(f, _)| {
13321332
minifier::js::replace_token_with(f, &|t: &Token<'_>| {
13331333
match *t {
13341334
Token::Keyword(Keyword::Null) => Some(Token::Other("N")),
@@ -1363,7 +1363,7 @@ fn write_minify_replacer<W: Write>(
13631363
// shouldn't be aggregated.
13641364
|tokens, pos| {
13651365
pos < 2 ||
1366-
!tokens[pos - 1].is_char(ReservedChar::OpenBracket) ||
1366+
!tokens[pos - 1].eq_char(ReservedChar::OpenBracket) ||
13671367
tokens[pos - 2].get_other() != Some("searchIndex")
13681368
}
13691369
)

0 commit comments

Comments
 (0)