@@ -192,9 +192,6 @@ crate struct SharedContext {
192192 /// The base-URL of the issue tracker for when an item has been tagged with
193193 /// an issue number.
194194 pub issue_tracker_base_url : Option < String > ,
195- /// The given user css file which allow to customize the generated
196- /// documentation theme.
197- pub css_file_extension : Option < PathBuf > ,
198195 /// The directories that have already been created in this doc run. Used to reduce the number
199196 /// of spurious `create_dir_all` calls.
200197 pub created_dirs : RefCell < FxHashSet < PathBuf > > ,
@@ -209,9 +206,6 @@ crate struct SharedContext {
209206 /// Optional path string to be used to load static files on output pages. If not set, uses
210207 /// combinations of `../` to reach the documentation root.
211208 pub static_root_path : Option < String > ,
212- /// If false, the `select` element to have search filtering by crates on rendered docs
213- /// won't be generated.
214- pub generate_search_filter : bool ,
215209 /// Option disabled by default to generate files used by RLS and some other tools.
216210 pub generate_redirect_pages : bool ,
217211 /// The fs handle we are working with.
@@ -545,14 +539,14 @@ pub fn run(mut krate: clean::Crate,
545539 favicon : String :: new ( ) ,
546540 external_html,
547541 krate : krate. name . clone ( ) ,
542+ css_file_extension : extension_css,
543+ generate_search_filter,
548544 } ,
549- css_file_extension : extension_css,
550545 created_dirs : Default :: default ( ) ,
551546 sort_modules_alphabetically,
552547 themes,
553548 resource_suffix,
554549 static_root_path,
555- generate_search_filter,
556550 generate_redirect_pages,
557551 fs : DocFS :: new ( & errors) ,
558552 } ;
@@ -932,7 +926,7 @@ themePicker.onblur = handleThemeButtonsBlur;
932926 options. enable_minification ) ?;
933927 }
934928
935- if let Some ( ref css) = cx. shared . css_file_extension {
929+ if let Some ( ref css) = cx. shared . layout . css_file_extension {
936930 let out = cx. dst . join ( & format ! ( "theme{}.css" , cx. shared. resource_suffix) ) ;
937931 let buffer = try_err ! ( fs:: read_to_string( css) , css) ;
938932 if !options. enable_minification {
@@ -1187,9 +1181,7 @@ themePicker.onblur = handleThemeButtonsBlur;
11871181 . collect:: <String >( ) ) ;
11881182 let v = layout:: render ( & cx. shared . layout ,
11891183 & page, & ( "" ) , & content,
1190- cx. shared . css_file_extension . is_some ( ) ,
1191- & cx. shared . themes ,
1192- cx. shared . generate_search_filter ) ;
1184+ & cx. shared . themes ) ;
11931185 cx. shared . fs . write ( & dst, v. as_bytes ( ) ) ?;
11941186 }
11951187 }
@@ -1940,9 +1932,7 @@ impl Context {
19401932 } ;
19411933 let v = layout:: render ( & self . shared . layout ,
19421934 & page, & sidebar, & all,
1943- self . shared . css_file_extension . is_some ( ) ,
1944- & self . shared . themes ,
1945- self . shared . generate_search_filter ) ;
1935+ & self . shared . themes ) ;
19461936 self . shared . fs . write ( & final_file, v. as_bytes ( ) ) ?;
19471937
19481938 // Generating settings page.
@@ -1958,10 +1948,7 @@ impl Context {
19581948 let v = layout:: render (
19591949 & self . shared . layout ,
19601950 & page, & sidebar, & settings,
1961- self . shared . css_file_extension . is_some ( ) ,
1962- & themes,
1963- self . shared . generate_search_filter ,
1964- ) ;
1951+ & themes) ;
19651952 self . shared . fs . write ( & settings_file, v. as_bytes ( ) ) ?;
19661953
19671954 Ok ( ( ) )
@@ -2019,9 +2006,7 @@ impl Context {
20192006 layout:: render ( & self . shared . layout , & page,
20202007 & Sidebar { cx : self , item : it } ,
20212008 & Item { cx : self , item : it } ,
2022- self . shared . css_file_extension . is_some ( ) ,
2023- & self . shared . themes ,
2024- self . shared . generate_search_filter )
2009+ & self . shared . themes )
20252010 } else {
20262011 let mut url = self . root_path ( ) ;
20272012 if let Some ( & ( ref names, ty) ) = cache ( ) . paths . get ( & it. def_id ) {
0 commit comments