@@ -332,14 +332,13 @@ where
332
332
}
333
333
334
334
/// Create a new TUF client. It will trust and update the TUF database.
335
- pub async fn from_database (
336
- config : Config ,
337
- tuf : Database < D > ,
338
- local : L ,
339
- remote : R ,
340
- ) -> Result < Self > {
341
- let ( local, remote) = ( Repository :: new ( local) , Repository :: new ( remote) ) ;
342
- Self :: new ( config, tuf, local, remote) . await
335
+ pub fn from_database ( config : Config , tuf : Database < D > , local : L , remote : R ) -> Self {
336
+ Self {
337
+ config,
338
+ tuf,
339
+ local : Repository :: new ( local) ,
340
+ remote : Repository :: new ( remote) ,
341
+ }
343
342
}
344
343
345
344
/// Construct a client with the given parts.
@@ -1499,9 +1498,7 @@ mod test {
1499
1498
Database :: from_trusted_root ( metadata1. root ( ) . unwrap ( ) ) . unwrap ( ) ,
1500
1499
track_local,
1501
1500
track_remote,
1502
- )
1503
- . await
1504
- . unwrap ( ) ,
1501
+ ) ,
1505
1502
} ;
1506
1503
1507
1504
assert_eq ! ( client. tuf. trusted_root( ) . version( ) , 1 ) ;
@@ -1546,13 +1543,7 @@ mod test {
1546
1543
) ;
1547
1544
}
1548
1545
ConstructorMode :: FromDatabase => {
1549
- assert_eq ! (
1550
- client. local_repo( ) . take_tracks( ) ,
1551
- vec![ Track :: FetchErr (
1552
- MetadataPath :: root( ) ,
1553
- MetadataVersion :: Number ( 2 )
1554
- ) ] ,
1555
- ) ;
1546
+ assert_eq ! ( client. local_repo( ) . take_tracks( ) , vec![ ] , ) ;
1556
1547
}
1557
1548
} ;
1558
1549
0 commit comments