@@ -20,7 +20,7 @@ use wireframe_testing::{push_expect, recv_expect};
2020
2121#[ fixture]
2222fn queues ( ) -> ( PushQueues < u8 > , PushHandle < u8 > ) {
23- support:: builder ( )
23+ support:: builder :: < u8 > ( )
2424 . high_capacity ( 2 )
2525 . low_capacity ( 2 )
2626 . rate ( Some ( 1 ) )
@@ -30,7 +30,7 @@ fn queues() -> (PushQueues<u8>, PushHandle<u8>) {
3030
3131#[ fixture]
3232fn small_queues ( ) -> ( PushQueues < u8 > , PushHandle < u8 > ) {
33- support:: builder ( )
33+ support:: builder :: < u8 > ( )
3434 . build ( )
3535 . expect ( "failed to build PushQueues" )
3636}
@@ -40,29 +40,29 @@ fn small_queues() -> (PushQueues<u8>, PushHandle<u8>) {
4040#[ case:: zero( 0 ) ]
4141#[ case:: too_high( MAX_PUSH_RATE + 1 ) ]
4242fn builder_rejects_invalid_rate ( #[ case] rate : usize ) {
43- let result = support:: builder ( ) . rate ( Some ( rate) ) . build ( ) ;
43+ let result = support:: builder :: < u8 > ( ) . rate ( Some ( rate) ) . build ( ) ;
4444 assert ! ( matches!( result, Err ( PushConfigError :: InvalidRate ( r) ) if r == rate) ) ;
4545}
4646
4747/// Setting the rate to `None` disables throttling without error.
4848#[ test]
4949fn builder_accepts_none_rate ( ) {
50- let result = support:: builder ( ) . rate ( None ) . build ( ) ;
50+ let result = support:: builder :: < u8 > ( ) . rate ( None ) . build ( ) ;
5151 assert ! ( result. is_ok( ) , "builder should accept None rate" ) ;
5252}
5353
5454/// Builder accepts the maximum supported rate.
5555#[ test]
5656fn builder_accepts_max_rate ( ) {
57- let result = support:: builder ( ) . rate ( Some ( MAX_PUSH_RATE ) ) . build ( ) ;
57+ let result = support:: builder :: < u8 > ( ) . rate ( Some ( MAX_PUSH_RATE ) ) . build ( ) ;
5858 assert ! ( result. is_ok( ) , "builder should accept MAX_PUSH_RATE" ) ;
5959}
6060
6161/// Disabling throttling allows rapid bursts to succeed.
6262#[ tokio:: test]
6363async fn disables_throttling_allows_burst_pushes ( ) {
6464 time:: pause ( ) ;
65- let ( _queues, handle) = support:: builder ( )
65+ let ( _queues, handle) = support:: builder :: < u8 > ( )
6666 . high_capacity ( 20 )
6767 . low_capacity ( 20 )
6868 . unlimited ( )
@@ -81,19 +81,19 @@ async fn disables_throttling_allows_burst_pushes() {
8181
8282#[ test]
8383fn builder_rejects_zero_capacity ( ) {
84- let hi = support:: builder ( ) . high_capacity ( 0 ) . build ( ) ;
84+ let hi = support:: builder :: < u8 > ( ) . high_capacity ( 0 ) . build ( ) ;
8585 assert ! ( matches!(
8686 hi,
8787 Err ( PushConfigError :: InvalidCapacity { high: 0 , low: 1 } )
8888 ) ) ;
8989
90- let lo = support:: builder ( ) . low_capacity ( 0 ) . build ( ) ;
90+ let lo = support:: builder :: < u8 > ( ) . low_capacity ( 0 ) . build ( ) ;
9191 assert ! ( matches!(
9292 lo,
9393 Err ( PushConfigError :: InvalidCapacity { high: 1 , low: 0 } )
9494 ) ) ;
9595
96- let both = support:: builder ( ) . high_capacity ( 0 ) . low_capacity ( 0 ) . build ( ) ;
96+ let both = support:: builder :: < u8 > ( ) . high_capacity ( 0 ) . low_capacity ( 0 ) . build ( ) ;
9797 assert ! ( matches!(
9898 both,
9999 Err ( PushConfigError :: InvalidCapacity { high: 0 , low: 0 } )
@@ -230,7 +230,7 @@ async fn rate_limiter_shared_across_priorities() {
230230#[ tokio:: test]
231231async fn unlimited_queues_do_not_block ( ) {
232232 time:: pause ( ) ;
233- let ( mut queues, handle) = support:: builder ( )
233+ let ( mut queues, handle) = support:: builder :: < u8 > ( )
234234 . unlimited ( )
235235 . build ( )
236236 . expect ( "failed to build PushQueues" ) ;
@@ -248,7 +248,7 @@ async fn unlimited_queues_do_not_block() {
248248#[ tokio:: test]
249249async fn rate_limiter_allows_burst_within_capacity_and_blocks_excess ( ) {
250250 time:: pause ( ) ;
251- let ( mut queues, handle) = support:: builder ( )
251+ let ( mut queues, handle) = support:: builder :: < u8 > ( )
252252 . high_capacity ( 4 )
253253 . low_capacity ( 4 )
254254 . rate ( Some ( 3 ) )
0 commit comments