@@ -12,7 +12,7 @@ use crate::{
12
12
OutboundPeer , State ,
13
13
} ;
14
14
15
- pub fn mock_discover_svc < Req : Send + ' static > ( ) -> (
15
+ pub ( crate ) fn mock_discover_svc < Req : Send + ' static > ( ) -> (
16
16
impl Stream <
17
17
Item = Result <
18
18
OutboundPeer <
@@ -49,7 +49,7 @@ pub fn mock_discover_svc<Req: Send + 'static>() -> (
49
49
( discover, rx)
50
50
}
51
51
52
- pub fn mock_broadcast_svc < Req : Send + ' static > ( ) -> (
52
+ pub ( crate ) fn mock_broadcast_svc < Req : Send + ' static > ( ) -> (
53
53
impl Service <
54
54
Req ,
55
55
Future = impl Future < Output = Result < ( ) , tower:: BoxError > > + Send + ' static ,
@@ -70,8 +70,8 @@ pub fn mock_broadcast_svc<Req: Send + 'static>() -> (
70
70
)
71
71
}
72
72
73
- #[ allow ( clippy:: type_complexity) ] // just test code.
74
- pub fn mock_in_memory_backing_pool <
73
+ #[ expect ( clippy:: type_complexity, reason = " just test code." ) ]
74
+ pub ( crate ) fn mock_in_memory_backing_pool <
75
75
Tx : Clone + Send + ' static ,
76
76
TxID : Clone + Hash + Eq + Send + ' static ,
77
77
> ( ) -> (
@@ -85,11 +85,11 @@ pub fn mock_in_memory_backing_pool<
85
85
Arc < std:: sync:: Mutex < HashMap < TxID , ( Tx , State ) > > > ,
86
86
) {
87
87
let txs = Arc :: new ( std:: sync:: Mutex :: new ( HashMap :: new ( ) ) ) ;
88
- let txs_2 = txs . clone ( ) ;
88
+ let txs_2 = Arc :: clone ( & txs ) ;
89
89
90
90
(
91
91
service_fn ( move |req : TxStoreRequest < TxID > | {
92
- let txs = txs . clone ( ) ;
92
+ let txs = Arc :: clone ( & txs ) ;
93
93
async move {
94
94
match req {
95
95
TxStoreRequest :: Get ( tx_id) => {
0 commit comments