diff options
Diffstat (limited to 'src/librustdoc/html/render/write_shared.rs')
| -rw-r--r-- | src/librustdoc/html/render/write_shared.rs | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index 8fb6d68f3c6..78bcd40af75 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -16,7 +16,6 @@ use crate::clean::Crate; use crate::config::{EmitType, RenderOptions}; use crate::docfs::PathError; use crate::error::Error; -use crate::formats::FormatRenderer; use crate::html::{layout, static_files}; crate static FILES_UNVERSIONED: Lazy<FxHashMap<&str, &[u8]>> = Lazy::new(|| { @@ -223,6 +222,7 @@ pub(super) fn write_shared( &format!(" = {}", serde_json::to_string(&themes).unwrap()), ), )?; + write_minify("search.js", static_files::SEARCH_JS)?; write_minify("settings.js", static_files::SETTINGS_JS)?; if cx.shared.include_sources { write_minify("source-script.js", static_files::sidebar::SOURCE_SCRIPT)?; @@ -410,7 +410,7 @@ pub(super) fn write_shared( write_crate("search-index.js", &|| { let mut v = String::from("var searchIndex = JSON.parse('{\\\n"); v.push_str(&all_indexes.join(",\\\n")); - v.push_str("\\\n}');\ninitSearch(searchIndex);"); + v.push_str("\\\n}');\nif (window.initSearch) {window.initSearch(searchIndex)};"); Ok(v.into_bytes()) })?; @@ -500,7 +500,7 @@ pub(super) fn write_shared( None } else { Some(Implementor { - text: imp.inner_impl().print(cx.cache(), false, cx.tcx()).to_string(), + text: imp.inner_impl().print(false, cx).to_string(), synthetic: imp.inner_impl().synthetic, types: collect_paths_for_type(imp.inner_impl().for_.clone(), cx.cache()), }) | 
