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