14
14
15
15
use std:: collections:: hash_map;
16
16
use std:: collections:: VecDeque ;
17
- #[ cfg( feature = "sfv" ) ]
18
17
use std:: convert:: TryFrom ;
19
18
use std:: mem:: MaybeUninit ;
20
19
use std:: sync:: Arc ;
@@ -2106,8 +2105,6 @@ impl Http3Priority {
2106
2105
}
2107
2106
}
2108
2107
2109
- #[ cfg( feature = "sfv" ) ]
2110
- #[ cfg_attr( docsrs, doc( cfg( feature = "sfv" ) ) ) ]
2111
2108
impl TryFrom < & [ u8 ] > for Http3Priority {
2112
2109
type Error = crate :: h3:: Http3Error ;
2113
2110
@@ -4414,17 +4411,14 @@ mod tests {
4414
4411
4415
4412
assert_eq ! ( s. server_poll( ) , Ok ( ( stream_id, Http3Event :: PriorityUpdate ) ) ) ;
4416
4413
4417
- #[ cfg( feature = "sfv" ) ]
4418
- {
4419
- let priority_value = s. server . take_priority_update ( stream_id) . unwrap ( ) ;
4420
- assert_eq ! (
4421
- Http3Priority :: try_from( priority_value. as_slice( ) ) ,
4422
- Ok ( Http3Priority {
4423
- urgency: 3 ,
4424
- incremental: false
4425
- } )
4426
- ) ;
4427
- }
4414
+ let priority_value = s. server . take_priority_update ( stream_id) . unwrap ( ) ;
4415
+ assert_eq ! (
4416
+ Http3Priority :: try_from( priority_value. as_slice( ) ) ,
4417
+ Ok ( Http3Priority {
4418
+ urgency: 3 ,
4419
+ incremental: false
4420
+ } )
4421
+ ) ;
4428
4422
4429
4423
// Subcase3: Client send priority update for request stream, incremental.
4430
4424
s. client
@@ -4442,17 +4436,14 @@ mod tests {
4442
4436
4443
4437
assert_eq ! ( s. server_poll( ) , Ok ( ( stream_id, Http3Event :: PriorityUpdate ) ) ) ;
4444
4438
4445
- #[ cfg( feature = "sfv" ) ]
4446
- {
4447
- let priority_value = s. server . take_priority_update ( stream_id) . unwrap ( ) ;
4448
- assert_eq ! (
4449
- Http3Priority :: try_from( priority_value. as_slice( ) ) ,
4450
- Ok ( Http3Priority {
4451
- urgency: 3 ,
4452
- incremental: true
4453
- } )
4454
- ) ;
4455
- }
4439
+ let priority_value = s. server . take_priority_update ( stream_id) . unwrap ( ) ;
4440
+ assert_eq ! (
4441
+ Http3Priority :: try_from( priority_value. as_slice( ) ) ,
4442
+ Ok ( Http3Priority {
4443
+ urgency: 3 ,
4444
+ incremental: true
4445
+ } )
4446
+ ) ;
4456
4447
4457
4448
assert_eq ! ( s. server_poll( ) , Err ( Http3Error :: Done ) ) ;
4458
4449
}
@@ -4480,17 +4471,14 @@ mod tests {
4480
4471
// 2. Server receive priority update.
4481
4472
assert_eq ! ( s. server_poll( ) , Ok ( ( stream_id, Http3Event :: PriorityUpdate ) ) ) ;
4482
4473
4483
- #[ cfg( feature = "sfv" ) ]
4484
- {
4485
- let priority_value = s. server . take_priority_update ( stream_id) . unwrap ( ) ;
4486
- assert_eq ! (
4487
- Http3Priority :: try_from( priority_value. as_slice( ) ) ,
4488
- Ok ( Http3Priority {
4489
- urgency: 3 ,
4490
- incremental: false
4491
- } )
4492
- ) ;
4493
- }
4474
+ let priority_value = s. server . take_priority_update ( stream_id) . unwrap ( ) ;
4475
+ assert_eq ! (
4476
+ Http3Priority :: try_from( priority_value. as_slice( ) ) ,
4477
+ Ok ( Http3Priority {
4478
+ urgency: 3 ,
4479
+ incremental: false
4480
+ } )
4481
+ ) ;
4494
4482
4495
4483
// Stream's priority is not initialized, the underlying quic stream is not opened, in server side.
4496
4484
let stream = s. server . streams . get ( & stream_id) . unwrap ( ) ;
@@ -4576,17 +4564,14 @@ mod tests {
4576
4564
assert_eq ! ( s. server_poll( ) , Ok ( ( stream_id, Http3Event :: PriorityUpdate ) ) ) ;
4577
4565
assert_eq ! ( s. server_poll( ) , Err ( Http3Error :: Done ) ) ;
4578
4566
4579
- #[ cfg( feature = "sfv" ) ]
4580
- {
4581
- let priority_value = s. server . take_priority_update ( stream_id) . unwrap ( ) ;
4582
- assert_eq ! (
4583
- Http3Priority :: try_from( priority_value. as_slice( ) ) ,
4584
- Ok ( Http3Priority {
4585
- urgency: 5 ,
4586
- incremental: false
4587
- } )
4588
- ) ;
4589
- }
4567
+ let priority_value = s. server . take_priority_update ( stream_id) . unwrap ( ) ;
4568
+ assert_eq ! (
4569
+ Http3Priority :: try_from( priority_value. as_slice( ) ) ,
4570
+ Ok ( Http3Priority {
4571
+ urgency: 5 ,
4572
+ incremental: false
4573
+ } )
4574
+ ) ;
4590
4575
4591
4576
assert_eq ! ( s. server_poll( ) , Err ( Http3Error :: Done ) ) ;
4592
4577
}
@@ -4818,7 +4803,6 @@ mod tests {
4818
4803
}
4819
4804
4820
4805
#[ test]
4821
- #[ cfg( feature = "sfv" ) ]
4822
4806
fn parse_extensible_priority ( ) {
4823
4807
for ( priority, urgency, incremental) in [
4824
4808
( "" , PRIORITY_URGENCY_DEFAULT , PRIORITY_INCREMENTAL_DEFAULT ) ,
0 commit comments