@@ -486,16 +486,19 @@ mod tests {
486
486
use std:: {
487
487
convert:: Infallible ,
488
488
sync:: {
489
- atomic:: { AtomicU64 , Ordering } ,
489
+ atomic:: Ordering ,
490
490
Arc ,
491
491
} ,
492
492
} ;
493
+ #[ cfg( target_has_atomic = "64" ) ]
494
+ use std:: sync:: atomic:: AtomicU64 ;
493
495
use tower:: { ServiceBuilder , ServiceExt } ;
494
496
495
497
#[ allow( unused_imports) ]
496
498
use super :: * ;
497
499
498
500
#[ tokio:: test]
501
+ #[ cfg( target_has_atomic = "64" ) ]
499
502
async fn basic ( ) {
500
503
let svc = ServiceBuilder :: new ( )
501
504
. set_x_request_id ( Counter :: default ( ) )
@@ -526,6 +529,7 @@ mod tests {
526
529
}
527
530
528
531
#[ tokio:: test]
532
+ #[ cfg( target_has_atomic = "64" ) ]
529
533
async fn other_middleware_setting_request_id ( ) {
530
534
let svc = ServiceBuilder :: new ( )
531
535
. override_request_header (
@@ -554,6 +558,7 @@ mod tests {
554
558
}
555
559
556
560
#[ tokio:: test]
561
+ #[ cfg( target_has_atomic = "64" ) ]
557
562
async fn other_middleware_setting_request_id_on_response ( ) {
558
563
let svc = ServiceBuilder :: new ( )
559
564
. set_x_request_id ( Counter :: default ( ) )
@@ -574,8 +579,10 @@ mod tests {
574
579
}
575
580
576
581
#[ derive( Clone , Default ) ]
582
+ #[ cfg( target_has_atomic = "64" ) ]
577
583
struct Counter ( Arc < AtomicU64 > ) ;
578
584
585
+ #[ cfg( target_has_atomic = "64" ) ]
579
586
impl MakeRequestId for Counter {
580
587
fn make_request_id < B > ( & mut self , _request : & Request < B > ) -> Option < RequestId > {
581
588
let id =
0 commit comments