@@ -193,16 +193,9 @@ where
193
193
pkg_id,
194
194
name,
195
195
Arc :: new ( Fingerprint {
196
- rustc : 0 ,
197
- target : 0 ,
198
- profile : 0 ,
199
- path : 0 ,
200
196
local : vec ! [ LocalFingerprint :: Precalculated ( String :: new( ) ) ] ,
201
- features : String :: new ( ) ,
202
- deps : Vec :: new ( ) ,
203
197
memoized_hash : Mutex :: new ( Some ( hash) ) ,
204
- edition : Edition :: Edition2015 ,
205
- rustflags : Vec :: new ( ) ,
198
+ ..Fingerprint :: new ( )
206
199
} ) ,
207
200
)
208
201
} )
@@ -228,6 +221,21 @@ impl LocalFingerprint {
228
221
struct MtimeSlot ( Mutex < Option < FileTime > > ) ;
229
222
230
223
impl Fingerprint {
224
+ fn new ( ) -> Fingerprint {
225
+ Fingerprint {
226
+ rustc : 0 ,
227
+ target : 0 ,
228
+ profile : 0 ,
229
+ path : 0 ,
230
+ features : String :: new ( ) ,
231
+ deps : Vec :: new ( ) ,
232
+ local : Vec :: new ( ) ,
233
+ memoized_hash : Mutex :: new ( None ) ,
234
+ edition : Edition :: Edition2015 ,
235
+ rustflags : Vec :: new ( ) ,
236
+ }
237
+ }
238
+
231
239
fn update_local ( & self , root : & Path ) -> CargoResult < ( ) > {
232
240
let mut hash_busted = false ;
233
241
for local in self . local . iter ( ) {
@@ -529,18 +537,7 @@ pub fn prepare_build_cmd<'a, 'cfg>(
529
537
debug ! ( "fingerprint at: {}" , loc. display( ) ) ;
530
538
531
539
let ( local, output_path) = build_script_local_fingerprints ( cx, unit) ?;
532
- let mut fingerprint = Fingerprint {
533
- rustc : 0 ,
534
- target : 0 ,
535
- profile : 0 ,
536
- path : 0 ,
537
- features : String :: new ( ) ,
538
- deps : Vec :: new ( ) ,
539
- local,
540
- memoized_hash : Mutex :: new ( None ) ,
541
- edition : Edition :: Edition2015 ,
542
- rustflags : Vec :: new ( ) ,
543
- } ;
540
+ let mut fingerprint = Fingerprint { local, ..Fingerprint :: new ( ) } ;
544
541
let compare = compare_old_fingerprint ( & loc, & fingerprint) ;
545
542
log_compare ( unit, & compare) ;
546
543
0 commit comments