diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-04-25 13:20:43 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-04-25 13:20:43 +0200 |
| commit | 6aa5a5df965db2d6f567fe34a316b5f4e0234c15 (patch) | |
| tree | 2cc15b88ec0f080903badec1cc6d51138b1778cc /src | |
| parent | f199627e69baccdb44f41e945d189aa04d0df022 (diff) | |
| download | rust-6aa5a5df965db2d6f567fe34a316b5f4e0234c15.tar.gz rust-6aa5a5df965db2d6f567fe34a316b5f4e0234c15.zip | |
Improvement comment explanations
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/render.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 703f7b18d16..bd74789b65b 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1319,8 +1319,11 @@ fn write_minify_replacer<W: Write>( f, "R", Token::Char(ReservedChar::Backline), - // This closure prevents crates' name to be aggregated. It allows to not - // have to look for crate's name into the strings array. + // This closure prevents crates' names from being aggregated. + // + // The point here is to check if the string is preceded by '[' and + // "searchIndex". If so, it means this is a crate name and that it + // shouldn't be aggregated. |tokens, pos| { pos < 2 || !tokens[pos - 1].is_char(ReservedChar::OpenBracket) || |
