@@ -54,10 +54,10 @@ impl StaticFiles {
54
54
}
55
55
this. add_builtin ( "css/variables.css" , & theme. variables_css ) ;
56
56
if let Some ( contents) = & theme. favicon_png {
57
- this. add_builtin ( "favicon.png" , & contents) ;
57
+ this. add_builtin ( "favicon.png" , contents) ;
58
58
}
59
59
if let Some ( contents) = & theme. favicon_svg {
60
- this. add_builtin ( "favicon.svg" , & contents) ;
60
+ this. add_builtin ( "favicon.svg" , contents) ;
61
61
}
62
62
this. add_builtin ( "highlight.css" , & theme. highlight_css ) ;
63
63
this. add_builtin ( "tomorrow-night.css" , & theme. tomorrow_night_css ) ;
@@ -131,8 +131,8 @@ impl StaticFiles {
131
131
. iter ( )
132
132
. chain ( html_config. additional_js . iter ( ) ) ;
133
133
134
- for custom_file in custom_files. cloned ( ) {
135
- let input_location = root. join ( & custom_file) ;
134
+ for custom_file in custom_files {
135
+ let input_location = root. join ( custom_file) ;
136
136
137
137
this. static_files . push ( StaticFile :: Additional {
138
138
input_location,
@@ -245,8 +245,8 @@ impl StaticFiles {
245
245
. expect ( "capture 1 in resource regex" )
246
246
. as_bytes ( ) ;
247
247
let name = std:: str:: from_utf8 ( name) . expect ( "resource name with invalid utf8" ) ;
248
- let resource_filename = hash_map. get ( name) . map ( |s| & s[ ..] ) . unwrap_or ( & name) ;
249
- let path_to_root = utils:: fs:: path_to_root ( & filename) ;
248
+ let resource_filename = hash_map. get ( name) . map ( |s| & s[ ..] ) . unwrap_or ( name) ;
249
+ let path_to_root = utils:: fs:: path_to_root ( filename) ;
250
250
format ! ( "{}{}" , path_to_root, resource_filename)
251
251
. as_bytes ( )
252
252
. to_owned ( )
@@ -261,7 +261,7 @@ impl StaticFiles {
261
261
} else {
262
262
Cow :: Borrowed ( & data[ ..] )
263
263
} ;
264
- write_file ( destination, & filename, & data) ?;
264
+ write_file ( destination, filename, & data) ?;
265
265
}
266
266
StaticFile :: Additional {
267
267
ref input_location,
@@ -284,7 +284,7 @@ impl StaticFiles {
284
284
let data = replace_all ( & self . hash_map , & data, filename) ;
285
285
write_file ( destination, filename, & data) ?;
286
286
} else {
287
- fs:: copy ( & input_location, & output_location) . with_context ( || {
287
+ fs:: copy ( input_location, & output_location) . with_context ( || {
288
288
format ! (
289
289
"Unable to copy {} to {}" ,
290
290
input_location. display( ) ,
0 commit comments