@@ -917,17 +917,6 @@ where
917
917
self . stage_targets_if_necessary ( ) ?. commit ( ) . await
918
918
}
919
919
920
- /// Commit the metadata for this repository without validating it.
921
- ///
922
- /// Warning: This can write invalid metadata to a repository without
923
- /// validating that it is correct.
924
- #[ cfg( test) ]
925
- pub async fn commit_skip_validation ( self ) -> Result < RawSignedMetadataSet < D > > {
926
- self . stage_targets_if_necessary ( ) ?
927
- . commit_skip_validation ( )
928
- . await
929
- }
930
-
931
920
fn need_new_targets ( & self ) -> bool {
932
921
// We need a new targets metadata if we added any targets.
933
922
if !self . state . targets . is_empty ( ) {
@@ -1086,17 +1075,6 @@ where
1086
1075
self . stage_snapshot_if_necessary ( ) ?. commit ( ) . await
1087
1076
}
1088
1077
1089
- /// Commit the metadata for this repository without validating it.
1090
- ///
1091
- /// Warning: This can write invalid metadata to a repository without
1092
- /// validating that it is correct.
1093
- #[ cfg( test) ]
1094
- pub async fn commit_skip_validation ( self ) -> Result < RawSignedMetadataSet < D > > {
1095
- self . stage_snapshot_if_necessary ( ) ?
1096
- . commit_skip_validation ( )
1097
- . await
1098
- }
1099
-
1100
1078
fn need_new_snapshot ( & self ) -> bool {
1101
1079
// We need a new snapshot metadata if we staged a new root.
1102
1080
if self . state . staged_root . is_some ( ) {
@@ -1255,17 +1233,6 @@ where
1255
1233
self . stage_timestamp_if_necessary ( ) ?. commit ( ) . await
1256
1234
}
1257
1235
1258
- /// Commit the metadata for this repository without validating it.
1259
- ///
1260
- /// Warning: This can write invalid metadata to a repository without
1261
- /// validating that it is correct.
1262
- #[ cfg( test) ]
1263
- pub async fn commit_skip_validation ( self ) -> Result < RawSignedMetadataSet < D > > {
1264
- self . stage_timestamp_if_necessary ( ) ?
1265
- . commit_skip_validation ( )
1266
- . await
1267
- }
1268
-
1269
1236
fn need_new_timestamp ( & self ) -> bool {
1270
1237
// We need a new timestamp metadata if we staged a new root.
1271
1238
if self . state . staged_root . is_some ( ) {
@@ -1312,23 +1279,7 @@ where
1312
1279
pub async fn commit ( mut self ) -> Result < RawSignedMetadataSet < D > > {
1313
1280
self . validate_built_metadata ( ) ?;
1314
1281
self . write_repo ( ) . await ?;
1315
- Ok ( self . build_skip_validation ( ) )
1316
- }
1317
1282
1318
- /// Commit the metadata for this repository without validating it.
1319
- ///
1320
- /// Warning: This can write invalid metadata to a repository without validating that it is
1321
- /// correct.
1322
- #[ cfg( test) ]
1323
- pub async fn commit_skip_validation ( mut self ) -> Result < RawSignedMetadataSet < D > > {
1324
- self . write_repo ( ) . await ?;
1325
- Ok ( self . build_skip_validation ( ) )
1326
- }
1327
-
1328
- /// Build the metadata without validating it for correctness.
1329
- ///
1330
- /// Warning: This can produce invalid metadata.
1331
- fn build_skip_validation ( self ) -> RawSignedMetadataSet < D > {
1332
1283
let mut builder = RawSignedMetadataSetBuilder :: new ( ) ;
1333
1284
1334
1285
if let Some ( root) = self . state . staged_root {
@@ -1347,7 +1298,7 @@ where
1347
1298
builder = builder. timestamp ( timestamp. raw ) ;
1348
1299
}
1349
1300
1350
- builder. build ( )
1301
+ Ok ( builder. build ( ) )
1351
1302
}
1352
1303
1353
1304
/// Before we commit any metadata, make sure that we can update from our
0 commit comments