File tree 3 files changed +16
-15
lines changed
3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -149,11 +149,12 @@ impl Sass {
149
149
// Hash the contents to generate a file name, and then write the contents to the dist
150
150
// dir.
151
151
let hash = seahash:: hash ( css. as_bytes ( ) ) ;
152
- let file_name = self
153
- . cfg
154
- . filehash
155
- . then ( || format ! ( "{}-{:x}.css" , & self . asset. file_stem. to_string_lossy( ) , hash) )
156
- . unwrap_or ( temp_target_file_name) ;
152
+
153
+ let file_name = if self . cfg . filehash {
154
+ format ! ( "{}-{:x}.css" , & self . asset. file_stem. to_string_lossy( ) , hash)
155
+ } else {
156
+ temp_target_file_name
157
+ } ;
157
158
158
159
let result_dir =
159
160
target_path ( & self . cfg . staging_dist , self . target_path . as_deref ( ) , None ) . await ?;
Original file line number Diff line number Diff line change @@ -130,11 +130,11 @@ impl TailwindCss {
130
130
// Hash the contents to generate a file name, and then write the contents to the dist
131
131
// dir.
132
132
let hash = seahash:: hash ( css. as_bytes ( ) ) ;
133
- let file_name = self
134
- . cfg
135
- . filehash
136
- . then ( || format ! ( "{}-{:x}.css" , & self . asset . file_stem . to_string_lossy ( ) , hash ) )
137
- . unwrap_or ( file_name ) ;
133
+ let file_name = if self . cfg . filehash {
134
+ format ! ( "{}-{:x}.css" , & self . asset . file_stem . to_string_lossy ( ) , hash )
135
+ } else {
136
+ file_name
137
+ } ;
138
138
139
139
let result_dir =
140
140
target_path ( & self . cfg . staging_dist , self . target_path . as_deref ( ) , None ) . await ?;
Original file line number Diff line number Diff line change @@ -130,11 +130,11 @@ impl TailwindCssExtra {
130
130
// Hash the contents to generate a file name, and then write the contents to the dist
131
131
// dir.
132
132
let hash = seahash:: hash ( css. as_bytes ( ) ) ;
133
- let file_name = self
134
- . cfg
135
- . filehash
136
- . then ( || format ! ( "{}-{:x}.css" , & self . asset . file_stem . to_string_lossy ( ) , hash ) )
137
- . unwrap_or ( file_name ) ;
133
+ let file_name = if self . cfg . filehash {
134
+ format ! ( "{}-{:x}.css" , & self . asset . file_stem . to_string_lossy ( ) , hash )
135
+ } else {
136
+ file_name
137
+ } ;
138
138
139
139
let result_dir =
140
140
target_path ( & self . cfg . staging_dist , self . target_path . as_deref ( ) , None ) . await ?;
You can’t perform that action at this time.
0 commit comments