File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
src/renderer/html_handlebars Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,6 @@ impl StaticFiles {
229229 pub fn write_files ( self , destination : & Path ) -> Result < ResourceHelper > {
230230 use crate :: utils:: fs:: write_file;
231231 use regex:: bytes:: { Captures , Regex } ;
232- use std:: io:: Read ;
233232 // The `{{ resource "name" }}` directive in static resources look like
234233 // handlebars syntax, even if they technically aren't.
235234 static RESOURCE : Lazy < Regex > =
@@ -278,9 +277,7 @@ impl StaticFiles {
278277 . with_context ( || format ! ( "Unable to create {}" , parent. display( ) ) ) ?;
279278 }
280279 if filename. ends_with ( ".css" ) || filename. ends_with ( ".js" ) {
281- let mut file = File :: open ( input_location) ?;
282- let mut data = Vec :: new ( ) ;
283- file. read_to_end ( & mut data) ?;
280+ let data = fs:: read ( input_location) ?;
284281 let data = replace_all ( & self . hash_map , & data, filename) ;
285282 write_file ( destination, filename, & data) ?;
286283 } else {
You can’t perform that action at this time.
0 commit comments