File tree 1 file changed +1
-4
lines changed
src/renderer/html_handlebars
1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,6 @@ impl StaticFiles {
229
229
pub fn write_files ( self , destination : & Path ) -> Result < ResourceHelper > {
230
230
use crate :: utils:: fs:: write_file;
231
231
use regex:: bytes:: { Captures , Regex } ;
232
- use std:: io:: Read ;
233
232
// The `{{ resource "name" }}` directive in static resources look like
234
233
// handlebars syntax, even if they technically aren't.
235
234
static RESOURCE : Lazy < Regex > =
@@ -278,9 +277,7 @@ impl StaticFiles {
278
277
. with_context ( || format ! ( "Unable to create {}" , parent. display( ) ) ) ?;
279
278
}
280
279
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) ?;
284
281
let data = replace_all ( & self . hash_map , & data, filename) ;
285
282
write_file ( destination, filename, & data) ?;
286
283
} else {
You can’t perform that action at this time.
0 commit comments