Skip to content

Commit 6aa5a5d

Browse files
Improvement comment explanations
1 parent f199627 commit 6aa5a5d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/librustdoc/html/render.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1319,8 +1319,11 @@ fn write_minify_replacer<W: Write>(
13191319
f,
13201320
"R",
13211321
Token::Char(ReservedChar::Backline),
1322-
// This closure prevents crates' name to be aggregated. It allows to not
1323-
// have to look for crate's name into the strings array.
1322+
// This closure prevents crates' names from being aggregated.
1323+
//
1324+
// The point here is to check if the string is preceded by '[' and
1325+
// "searchIndex". If so, it means this is a crate name and that it
1326+
// shouldn't be aggregated.
13241327
|tokens, pos| {
13251328
pos < 2 ||
13261329
!tokens[pos - 1].is_char(ReservedChar::OpenBracket) ||

0 commit comments

Comments
 (0)