@@ -76,7 +76,7 @@ use html::format::{VisSpace, Method, UnsafetySpace, MutableSpace};
76
76
use html:: format:: fmt_impl_for_trait_page;
77
77
use html:: item_type:: ItemType ;
78
78
use html:: markdown:: { self , Markdown , MarkdownHtml , MarkdownSummaryLine , ErrorCodes , IdMap } ;
79
- use html:: { highlight, layout} ;
79
+ use html:: { highlight, layout, static_files } ;
80
80
81
81
use minifier;
82
82
@@ -767,10 +767,10 @@ fn write_shared(
767
767
// overwrite them anyway to make sure that they're fresh and up-to-date.
768
768
769
769
write_minify ( cx. dst . join ( & format ! ( "rustdoc{}.css" , cx. shared. resource_suffix) ) ,
770
- include_str ! ( "static/rustdoc.css" ) ,
770
+ static_files :: RUSTDOC_CSS ,
771
771
options. enable_minification ) ?;
772
772
write_minify ( cx. dst . join ( & format ! ( "settings{}.css" , cx. shared. resource_suffix) ) ,
773
- include_str ! ( "static/settings.css" ) ,
773
+ static_files :: SETTINGS_CSS ,
774
774
options. enable_minification ) ?;
775
775
776
776
// To avoid "light.css" to be overwritten, we'll first run over the received themes and only
@@ -790,15 +790,15 @@ fn write_shared(
790
790
}
791
791
792
792
write ( cx. dst . join ( & format ! ( "brush{}.svg" , cx. shared. resource_suffix) ) ,
793
- include_bytes ! ( "static/brush.svg" ) ) ?;
793
+ static_files :: BRUSH_SVG ) ?;
794
794
write ( cx. dst . join ( & format ! ( "wheel{}.svg" , cx. shared. resource_suffix) ) ,
795
- include_bytes ! ( "static/wheel.svg" ) ) ?;
795
+ static_files :: WHEEL_SVG ) ?;
796
796
write_minify ( cx. dst . join ( & format ! ( "light{}.css" , cx. shared. resource_suffix) ) ,
797
- include_str ! ( "static/ themes/light.css" ) ,
797
+ static_files :: themes:: LIGHT ,
798
798
options. enable_minification ) ?;
799
799
themes. insert ( "light" . to_owned ( ) ) ;
800
800
write_minify ( cx. dst . join ( & format ! ( "dark{}.css" , cx. shared. resource_suffix) ) ,
801
- include_str ! ( "static/ themes/dark.css" ) ,
801
+ static_files :: themes:: DARK ,
802
802
options. enable_minification ) ?;
803
803
themes. insert ( "dark" . to_owned ( ) ) ;
804
804
@@ -854,16 +854,16 @@ themePicker.onblur = handleThemeButtonsBlur;
854
854
) ?;
855
855
856
856
write_minify ( cx. dst . join ( & format ! ( "main{}.js" , cx. shared. resource_suffix) ) ,
857
- include_str ! ( "static/main.js" ) ,
857
+ static_files :: MAIN_JS ,
858
858
options. enable_minification ) ?;
859
859
write_minify ( cx. dst . join ( & format ! ( "settings{}.js" , cx. shared. resource_suffix) ) ,
860
- include_str ! ( "static/settings.js" ) ,
860
+ static_files :: SETTINGS_JS ,
861
861
options. enable_minification ) ?;
862
862
863
863
{
864
864
let mut data = format ! ( "var resourcesSuffix = \" {}\" ;\n " ,
865
865
cx. shared. resource_suffix) ;
866
- data. push_str ( include_str ! ( "static/storage.js" ) ) ;
866
+ data. push_str ( static_files :: STORAGE_JS ) ;
867
867
write_minify ( cx. dst . join ( & format ! ( "storage{}.js" , cx. shared. resource_suffix) ) ,
868
868
& data,
869
869
options. enable_minification ) ?;
@@ -882,36 +882,36 @@ themePicker.onblur = handleThemeButtonsBlur;
882
882
}
883
883
}
884
884
write_minify ( cx. dst . join ( & format ! ( "normalize{}.css" , cx. shared. resource_suffix) ) ,
885
- include_str ! ( "static/normalize.css" ) ,
885
+ static_files :: NORMALIZE_CSS ,
886
886
options. enable_minification ) ?;
887
887
write ( cx. dst . join ( "FiraSans-Regular.woff" ) ,
888
- include_bytes ! ( "static/FiraSans-Regular.woff" ) ) ?;
888
+ static_files :: fira_sans :: REGULAR ) ?;
889
889
write ( cx. dst . join ( "FiraSans-Medium.woff" ) ,
890
- include_bytes ! ( "static/FiraSans-Medium.woff" ) ) ?;
890
+ static_files :: fira_sans :: MEDIUM ) ?;
891
891
write ( cx. dst . join ( "FiraSans-LICENSE.txt" ) ,
892
- include_bytes ! ( "static/FiraSans- LICENSE.txt" ) ) ?;
892
+ static_files :: fira_sans :: LICENSE ) ?;
893
893
write ( cx. dst . join ( "Heuristica-Italic.woff" ) ,
894
- include_bytes ! ( "static/Heuristica-Italic.woff" ) ) ?;
894
+ static_files :: heuristica :: ITALIC ) ?;
895
895
write ( cx. dst . join ( "Heuristica-LICENSE.txt" ) ,
896
- include_bytes ! ( "static/Heuristica- LICENSE.txt" ) ) ?;
896
+ static_files :: heuristica :: LICENSE ) ?;
897
897
write ( cx. dst . join ( "SourceSerifPro-Regular.woff" ) ,
898
- include_bytes ! ( "static/SourceSerifPro-Regular.woff" ) ) ?;
898
+ static_files :: source_serif_pro :: REGULAR ) ?;
899
899
write ( cx. dst . join ( "SourceSerifPro-Bold.woff" ) ,
900
- include_bytes ! ( "static/SourceSerifPro-Bold.woff" ) ) ?;
900
+ static_files :: source_serif_pro :: BOLD ) ?;
901
901
write ( cx. dst . join ( "SourceSerifPro-LICENSE.txt" ) ,
902
- include_bytes ! ( "static/SourceSerifPro- LICENSE.txt" ) ) ?;
902
+ static_files :: source_serif_pro :: LICENSE ) ?;
903
903
write ( cx. dst . join ( "SourceCodePro-Regular.woff" ) ,
904
- include_bytes ! ( "static/SourceCodePro-Regular.woff" ) ) ?;
904
+ static_files :: source_code_pro :: REGULAR ) ?;
905
905
write ( cx. dst . join ( "SourceCodePro-Semibold.woff" ) ,
906
- include_bytes ! ( "static/SourceCodePro-Semibold.woff" ) ) ?;
906
+ static_files :: source_code_pro :: SEMIBOLD ) ?;
907
907
write ( cx. dst . join ( "SourceCodePro-LICENSE.txt" ) ,
908
- include_bytes ! ( "static/SourceCodePro- LICENSE.txt" ) ) ?;
908
+ static_files :: source_code_pro :: LICENSE ) ?;
909
909
write ( cx. dst . join ( "LICENSE-MIT.txt" ) ,
910
- include_bytes ! ( "static/LICENSE-MIT.txt" ) ) ?;
910
+ static_files :: LICENSE_MIT ) ?;
911
911
write ( cx. dst . join ( "LICENSE-APACHE.txt" ) ,
912
- include_bytes ! ( "static/LICENSE-APACHE.txt" ) ) ?;
912
+ static_files :: LICENSE_APACHE ) ?;
913
913
write ( cx. dst . join ( "COPYRIGHT.txt" ) ,
914
- include_bytes ! ( "static/ COPYRIGHT.txt" ) ) ?;
914
+ static_files :: COPYRIGHT ) ?;
915
915
916
916
fn collect ( path : & Path , krate : & str , key : & str ) -> io:: Result < ( Vec < String > , Vec < String > ) > {
917
917
let mut ret = Vec :: new ( ) ;
0 commit comments