@@ -20,7 +20,7 @@ use std::sync::LazyLock;
2020/// and interprets the `{{ resource }}` directives to allow assets to name each other.
2121///
2222/// [fingerprinting]: https://guides.rubyonrails.org/asset_pipeline.html#fingerprinting-versioning-with-digest-based-urls
23- pub struct StaticFiles {
23+ pub ( super ) struct StaticFiles {
2424 static_files : Vec < StaticFile > ,
2525 hash_map : HashMap < String , String > ,
2626}
@@ -37,7 +37,7 @@ enum StaticFile {
3737}
3838
3939impl StaticFiles {
40- pub fn new ( theme : & Theme , html_config : & HtmlConfig , root : & Path ) -> Result < StaticFiles > {
40+ pub ( super ) fn new ( theme : & Theme , html_config : & HtmlConfig , root : & Path ) -> Result < StaticFiles > {
4141 let static_files = Vec :: new ( ) ;
4242 let mut this = StaticFiles {
4343 hash_map : HashMap :: new ( ) ,
@@ -156,7 +156,7 @@ impl StaticFiles {
156156 Ok ( this)
157157 }
158158
159- pub fn add_builtin ( & mut self , filename : & str , data : & [ u8 ] ) {
159+ pub ( super ) fn add_builtin ( & mut self , filename : & str , data : & [ u8 ] ) {
160160 self . static_files . push ( StaticFile :: Builtin {
161161 filename : filename. to_owned ( ) ,
162162 data : data. to_owned ( ) ,
@@ -165,7 +165,7 @@ impl StaticFiles {
165165
166166 /// Updates this [`StaticFiles`] to hash the contents for determining the
167167 /// filename for each resource.
168- pub fn hash_files ( & mut self ) -> Result < ( ) > {
168+ pub ( super ) fn hash_files ( & mut self ) -> Result < ( ) > {
169169 use sha2:: { Digest , Sha256 } ;
170170 use std:: io:: Read ;
171171 for static_file in & mut self . static_files {
@@ -224,7 +224,7 @@ impl StaticFiles {
224224 Ok ( ( ) )
225225 }
226226
227- pub fn write_files ( self , destination : & Path ) -> Result < ResourceHelper > {
227+ pub ( super ) fn write_files ( self , destination : & Path ) -> Result < ResourceHelper > {
228228 use mdbook_core:: utils:: fs:: write_file;
229229 use regex:: bytes:: { Captures , Regex } ;
230230 // The `{{ resource "name" }}` directive in static resources look like
0 commit comments