@@ -473,10 +473,8 @@ pub mod spire_tests {
473473
474474 assert ! ( identity. to_string( ) == "spiffe://example.org/ns/default/sa/test-sa" ) ;
475475
476- let composite_id = CompositeId :: with_key (
477- identity,
478- WorkloadUid :: new ( "uid-123456" . to_string ( ) ) ,
479- ) ;
476+ let composite_id =
477+ CompositeId :: with_key ( identity, WorkloadUid :: new ( "uid-123456" . to_string ( ) ) ) ;
480478
481479 let fetch_result = spire_client. fetch_certificate ( & composite_id) . await ;
482480
@@ -676,10 +674,8 @@ pub mod spire_tests {
676674
677675 assert ! ( identity. to_string( ) == "spiffe://example.org/ns/default/sa/test-sa" ) ;
678676
679- let composite_id = CompositeId :: with_key (
680- identity,
681- WorkloadUid :: new ( "uid-123456" . to_string ( ) ) ,
682- ) ;
677+ let composite_id =
678+ CompositeId :: with_key ( identity, WorkloadUid :: new ( "uid-123456" . to_string ( ) ) ) ;
683679
684680 let fetch_result = spire_client. fetch_certificate ( & composite_id) . await ;
685681
@@ -793,8 +789,6 @@ pub mod spire_tests {
793789 fn mock_stream_svid_success_response (
794790 spiffe_id : String ,
795791 ) -> Box < dyn Stream < Item = Result < X509Svid , GrpcClientError > > + Send + Unpin > {
796- // build a stream that yields X509Svid responses
797- // can you provide a minimal example of building such a stream?
798792 let ( mut tx, rx) = mpsc:: channel ( 10 ) ;
799793 tokio:: spawn ( async move {
800794 let svid = generate_svid ( & spiffe_id, "example.org" ) ;
@@ -806,8 +800,6 @@ pub mod spire_tests {
806800 fn mock_stream_svid_success_delay_response (
807801 spiffe_id : String ,
808802 ) -> Box < dyn Stream < Item = Result < X509Svid , GrpcClientError > > + Send + Unpin > {
809- // build a stream that yields X509Svid responses
810- // can you provide a minimal example of building such a stream?
811803 let ( mut tx, rx) = mpsc:: channel ( 10 ) ;
812804 tokio:: spawn ( async move {
813805 tx. send ( Err ( GrpcClientError :: EmptyResponse ) ) . await . unwrap ( ) ;
@@ -823,8 +815,6 @@ pub mod spire_tests {
823815 fn mock_stream_svid_success_delay_response_timeout (
824816 _: String ,
825817 ) -> Box < dyn Stream < Item = Result < X509Svid , GrpcClientError > > + Send + Unpin > {
826- // build a stream that yields X509Svid responses
827- // can you provide a minimal example of building such a stream?
828818 let ( _, rx) = mpsc:: channel ( 10 ) ;
829819 tokio:: spawn ( async move {
830820 tokio:: time:: sleep ( std:: time:: Duration :: from_secs ( 10 ) ) . await ;
@@ -835,8 +825,6 @@ pub mod spire_tests {
835825 fn mock_stream_svid_success_delay_response_timeout_empty (
836826 _: String ,
837827 ) -> Box < dyn Stream < Item = Result < X509Svid , GrpcClientError > > + Send + Unpin > {
838- // build a stream that yields X509Svid responses
839- // can you provide a minimal example of building such a stream?
840828 let ( mut tx, rx) = mpsc:: channel ( 10 ) ;
841829 tokio:: spawn ( async move {
842830 tx. send ( Err ( GrpcClientError :: EmptyResponse ) ) . await . unwrap ( ) ;
0 commit comments