@@ -76,7 +76,7 @@ use html::format::{VisSpace, Method, UnsafetySpace, MutableSpace};
7676use html:: format:: fmt_impl_for_trait_page;
7777use html:: item_type:: ItemType ;
7878use html:: markdown:: { self , Markdown , MarkdownHtml , MarkdownSummaryLine , ErrorCodes , IdMap } ;
79- use html:: { highlight, layout} ;
79+ use html:: { highlight, layout, static_files } ;
8080
8181use minifier;
8282
@@ -767,10 +767,10 @@ fn write_shared(
767767 // overwrite them anyway to make sure that they're fresh and up-to-date.
768768
769769 write_minify ( cx. dst . join ( & format ! ( "rustdoc{}.css" , cx. shared. resource_suffix) ) ,
770- include_str ! ( "static/rustdoc.css" ) ,
770+ static_files :: RUSTDOC_CSS ,
771771 options. enable_minification ) ?;
772772 write_minify ( cx. dst . join ( & format ! ( "settings{}.css" , cx. shared. resource_suffix) ) ,
773- include_str ! ( "static/settings.css" ) ,
773+ static_files :: SETTINGS_CSS ,
774774 options. enable_minification ) ?;
775775
776776 // To avoid "light.css" to be overwritten, we'll first run over the received themes and only
@@ -790,15 +790,15 @@ fn write_shared(
790790 }
791791
792792 write ( cx. dst . join ( & format ! ( "brush{}.svg" , cx. shared. resource_suffix) ) ,
793- include_bytes ! ( "static/brush.svg" ) ) ?;
793+ static_files :: BRUSH_SVG ) ?;
794794 write ( cx. dst . join ( & format ! ( "wheel{}.svg" , cx. shared. resource_suffix) ) ,
795- include_bytes ! ( "static/wheel.svg" ) ) ?;
795+ static_files :: WHEEL_SVG ) ?;
796796 write_minify ( cx. dst . join ( & format ! ( "light{}.css" , cx. shared. resource_suffix) ) ,
797- include_str ! ( "static/ themes/light.css" ) ,
797+ static_files :: themes:: LIGHT ,
798798 options. enable_minification ) ?;
799799 themes. insert ( "light" . to_owned ( ) ) ;
800800 write_minify ( cx. dst . join ( & format ! ( "dark{}.css" , cx. shared. resource_suffix) ) ,
801- include_str ! ( "static/ themes/dark.css" ) ,
801+ static_files :: themes:: DARK ,
802802 options. enable_minification ) ?;
803803 themes. insert ( "dark" . to_owned ( ) ) ;
804804
@@ -854,16 +854,16 @@ themePicker.onblur = handleThemeButtonsBlur;
854854 ) ?;
855855
856856 write_minify ( cx. dst . join ( & format ! ( "main{}.js" , cx. shared. resource_suffix) ) ,
857- include_str ! ( "static/main.js" ) ,
857+ static_files :: MAIN_JS ,
858858 options. enable_minification ) ?;
859859 write_minify ( cx. dst . join ( & format ! ( "settings{}.js" , cx. shared. resource_suffix) ) ,
860- include_str ! ( "static/settings.js" ) ,
860+ static_files :: SETTINGS_JS ,
861861 options. enable_minification ) ?;
862862
863863 {
864864 let mut data = format ! ( "var resourcesSuffix = \" {}\" ;\n " ,
865865 cx. shared. resource_suffix) ;
866- data. push_str ( include_str ! ( "static/storage.js" ) ) ;
866+ data. push_str ( static_files :: STORAGE_JS ) ;
867867 write_minify ( cx. dst . join ( & format ! ( "storage{}.js" , cx. shared. resource_suffix) ) ,
868868 & data,
869869 options. enable_minification ) ?;
@@ -882,36 +882,36 @@ themePicker.onblur = handleThemeButtonsBlur;
882882 }
883883 }
884884 write_minify ( cx. dst . join ( & format ! ( "normalize{}.css" , cx. shared. resource_suffix) ) ,
885- include_str ! ( "static/normalize.css" ) ,
885+ static_files :: NORMALIZE_CSS ,
886886 options. enable_minification ) ?;
887887 write ( cx. dst . join ( "FiraSans-Regular.woff" ) ,
888- include_bytes ! ( "static/FiraSans-Regular.woff" ) ) ?;
888+ static_files :: fira_sans :: REGULAR ) ?;
889889 write ( cx. dst . join ( "FiraSans-Medium.woff" ) ,
890- include_bytes ! ( "static/FiraSans-Medium.woff" ) ) ?;
890+ static_files :: fira_sans :: MEDIUM ) ?;
891891 write ( cx. dst . join ( "FiraSans-LICENSE.txt" ) ,
892- include_bytes ! ( "static/FiraSans- LICENSE.txt" ) ) ?;
892+ static_files :: fira_sans :: LICENSE ) ?;
893893 write ( cx. dst . join ( "Heuristica-Italic.woff" ) ,
894- include_bytes ! ( "static/Heuristica-Italic.woff" ) ) ?;
894+ static_files :: heuristica :: ITALIC ) ?;
895895 write ( cx. dst . join ( "Heuristica-LICENSE.txt" ) ,
896- include_bytes ! ( "static/Heuristica- LICENSE.txt" ) ) ?;
896+ static_files :: heuristica :: LICENSE ) ?;
897897 write ( cx. dst . join ( "SourceSerifPro-Regular.woff" ) ,
898- include_bytes ! ( "static/SourceSerifPro-Regular.woff" ) ) ?;
898+ static_files :: source_serif_pro :: REGULAR ) ?;
899899 write ( cx. dst . join ( "SourceSerifPro-Bold.woff" ) ,
900- include_bytes ! ( "static/SourceSerifPro-Bold.woff" ) ) ?;
900+ static_files :: source_serif_pro :: BOLD ) ?;
901901 write ( cx. dst . join ( "SourceSerifPro-LICENSE.txt" ) ,
902- include_bytes ! ( "static/SourceSerifPro- LICENSE.txt" ) ) ?;
902+ static_files :: source_serif_pro :: LICENSE ) ?;
903903 write ( cx. dst . join ( "SourceCodePro-Regular.woff" ) ,
904- include_bytes ! ( "static/SourceCodePro-Regular.woff" ) ) ?;
904+ static_files :: source_code_pro :: REGULAR ) ?;
905905 write ( cx. dst . join ( "SourceCodePro-Semibold.woff" ) ,
906- include_bytes ! ( "static/SourceCodePro-Semibold.woff" ) ) ?;
906+ static_files :: source_code_pro :: SEMIBOLD ) ?;
907907 write ( cx. dst . join ( "SourceCodePro-LICENSE.txt" ) ,
908- include_bytes ! ( "static/SourceCodePro- LICENSE.txt" ) ) ?;
908+ static_files :: source_code_pro :: LICENSE ) ?;
909909 write ( cx. dst . join ( "LICENSE-MIT.txt" ) ,
910- include_bytes ! ( "static/LICENSE-MIT.txt" ) ) ?;
910+ static_files :: LICENSE_MIT ) ?;
911911 write ( cx. dst . join ( "LICENSE-APACHE.txt" ) ,
912- include_bytes ! ( "static/LICENSE-APACHE.txt" ) ) ?;
912+ static_files :: LICENSE_APACHE ) ?;
913913 write ( cx. dst . join ( "COPYRIGHT.txt" ) ,
914- include_bytes ! ( "static/ COPYRIGHT.txt" ) ) ?;
914+ static_files :: COPYRIGHT ) ?;
915915
916916 fn collect ( path : & Path , krate : & str , key : & str ) -> io:: Result < ( Vec < String > , Vec < String > ) > {
917917 let mut ret = Vec :: new ( ) ;
0 commit comments