Skip to content
Permalink
Browse files

Don't generate minification variable if minification disabled

  • Loading branch information...
GuillaumeGomez committed Feb 22, 2019
1 parent 1349c84 commit b5ae4d58883151a977487de86856d9529df9d948
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/librustdoc/html/render.rs
@@ -1117,7 +1117,11 @@ themePicker.onblur = handleThemeButtonsBlur;
// with rustdoc running in parallel.
all_indexes.sort();
let mut w = try_err!(File::create(&dst), &dst);
try_err!(writeln!(&mut w, "var N=null,E=\"\",T=\"t\",U=\"u\",searchIndex={{}};"), &dst);
if options.enable_minification {
try_err!(writeln!(&mut w, "var N=null,E=\"\",T=\"t\",U=\"u\",searchIndex={{}};"), &dst);
} else {
try_err!(writeln!(&mut w, "var searchIndex={{}};"), &dst);
}
try_err!(write_minify_replacer(&mut w,
&format!("{}\n{}", variables.join(""), all_indexes.join("\n")),
options.enable_minification),

0 comments on commit b5ae4d5

Please sign in to comment.
You can’t perform that action at this time.