@@ -172,16 +172,16 @@ pub struct ValidationOutputFilters {
172
172
173
173
impl ValidationOutputFilters {
174
174
/// Creates a new value from the components.
175
+ ///
176
+ /// Sets the `aspa` field to `None`.
175
177
pub fn new (
176
178
prefix : impl Into < Vec < PrefixFilter > > ,
177
179
bgpsec : impl Into < Vec < BgpsecFilter > > ,
178
- aspa : Option < impl Into < Vec < AspaFilter > > > ,
179
180
) -> Self {
180
- let aspa = aspa. map ( |a| a. into ( ) ) ;
181
181
ValidationOutputFilters {
182
182
prefix : prefix. into ( ) ,
183
183
bgpsec : bgpsec. into ( ) ,
184
- aspa,
184
+ aspa : None ,
185
185
}
186
186
}
187
187
@@ -381,16 +381,16 @@ pub struct LocallyAddedAssertions {
381
381
382
382
impl LocallyAddedAssertions {
383
383
/// Creates a new value from its components.
384
+ ///
385
+ /// Sets the `aspa` field to `None`.
384
386
pub fn new (
385
387
prefix : impl Into < Vec < PrefixAssertion > > ,
386
388
bgpsec : impl Into < Vec < BgpsecAssertion > > ,
387
- aspa : Option < impl Into < Vec < AspaAssertion > > > ,
388
389
) -> Self {
389
- let aspa = aspa. map ( |a| a. into ( ) ) ;
390
390
LocallyAddedAssertions {
391
391
prefix : prefix. into ( ) ,
392
392
bgpsec : bgpsec. into ( ) ,
393
- aspa,
393
+ aspa : None ,
394
394
}
395
395
}
396
396
@@ -1189,7 +1189,6 @@ mod test {
1189
1189
Some ( String :: from ( "Key for ASN matching SKI" ) )
1190
1190
) ,
1191
1191
] ,
1192
- None :: < Vec < AspaFilter > >
1193
1192
) ,
1194
1193
LocallyAddedAssertions :: new (
1195
1194
[
@@ -1220,7 +1219,6 @@ mod test {
1220
1219
None ,
1221
1220
) ,
1222
1221
] ,
1223
- None :: < Vec < AspaAssertion > >
1224
1222
) ,
1225
1223
)
1226
1224
}
@@ -1237,8 +1235,8 @@ mod test {
1237
1235
1238
1236
fn full_slurm_v2 ( ) -> SlurmFile {
1239
1237
SlurmFile :: new (
1240
- ValidationOutputFilters :: new (
1241
- [
1238
+ ValidationOutputFilters {
1239
+ prefix : vec ! [
1242
1240
PrefixFilter :: new(
1243
1241
Some ( Prefix :: new_v4(
1244
1242
[ 192 , 0 , 2 , 0 ] . into( ) , 24
@@ -1263,7 +1261,7 @@ mod test {
1263
1261
) )
1264
1262
) ,
1265
1263
] ,
1266
- [
1264
+ bgpsec : vec ! [
1267
1265
BgpsecFilter :: new(
1268
1266
None ,
1269
1267
Some ( 64496 . into( ) ) ,
@@ -1280,15 +1278,15 @@ mod test {
1280
1278
Some ( String :: from( "Key for ASN matching SKI" ) )
1281
1279
) ,
1282
1280
] ,
1283
- Some ( [
1281
+ aspa : Some ( vec ! [
1284
1282
AspaFilter :: new(
1285
1283
Some ( 64496 . into( ) ) ,
1286
1284
Some ( String :: from( "ASPAs matching Customer ASID 64496" ) )
1287
1285
)
1288
- ] )
1289
- ) ,
1290
- LocallyAddedAssertions :: new (
1291
- [
1286
+ ] ) ,
1287
+ } ,
1288
+ LocallyAddedAssertions {
1289
+ prefix : vec ! [
1292
1290
PrefixAssertion :: new(
1293
1291
Prefix :: new_v4(
1294
1292
[ 198 , 51 , 100 , 0 ] . into( ) , 24
@@ -1308,22 +1306,27 @@ mod test {
1308
1306
Some ( String :: from( "My de-aggregated route" ) )
1309
1307
) ,
1310
1308
] ,
1311
- [
1309
+ bgpsec : vec ! [
1312
1310
BgpsecAssertion :: new(
1313
1311
64496 . into( ) ,
1314
1312
KeyIdentifier :: from( * b"12345678901234567890" ) ,
1315
1313
Bytes :: from( b"blubb" . as_ref( ) ) . try_into( ) . unwrap( ) ,
1316
1314
None ,
1317
1315
) ,
1318
1316
] ,
1319
- Some ( [
1317
+ aspa : Some ( vec ! [
1320
1318
AspaAssertion :: new(
1321
1319
64496 . into( ) ,
1322
- ProviderAsns :: try_from_iter ( [ 64497 . into ( ) , 64498 . into ( ) ] ) . unwrap ( ) ,
1323
- Some ( String :: from ( "Locally assert 64497 and 64498 are providers for 64496" ) )
1320
+ ProviderAsns :: try_from_iter(
1321
+ [ 64497 . into( ) , 64498 . into( ) ]
1322
+ ) . unwrap( ) ,
1323
+ Some ( String :: from(
1324
+ "Locally assert 64497 and 64498 are providers \
1325
+ for 64496"
1326
+ ) )
1324
1327
)
1325
1328
] )
1326
- ) ,
1329
+ } ,
1327
1330
)
1328
1331
}
1329
1332
0 commit comments