@@ -82,12 +82,12 @@ macro_rules! shardable_key {
8282
8383 fn shards(
8484 & self ,
85- pd_client: & std:: sync:: Arc <impl crate :: pd:: PdClient >,
85+ pd_client: & std:: sync:: Arc <impl $ crate:: pd:: PdClient >,
8686 ) -> futures:: stream:: BoxStream <
8787 ' static ,
88- crate :: Result <( Self :: Shard , crate :: store:: RegionStore ) >,
88+ $ crate:: Result <( Self :: Shard , $ crate:: store:: RegionStore ) >,
8989 > {
90- crate :: store:: store_stream_for_keys(
90+ $ crate:: store:: store_stream_for_keys(
9191 std:: iter:: once( self . key. clone( ) ) ,
9292 pd_client. clone( ) ,
9393 )
@@ -96,8 +96,8 @@ macro_rules! shardable_key {
9696 fn apply_shard(
9797 & mut self ,
9898 mut shard: Self :: Shard ,
99- store: & crate :: store:: RegionStore ,
100- ) -> crate :: Result <( ) > {
99+ store: & $ crate:: store:: RegionStore ,
100+ ) -> $ crate:: Result <( ) > {
101101 self . set_context( store. region_with_leader. context( ) ?) ;
102102 assert!( shard. len( ) == 1 ) ;
103103 self . set_key( shard. pop( ) . unwrap( ) ) ;
@@ -115,21 +115,21 @@ macro_rules! shardable_keys {
115115
116116 fn shards(
117117 & self ,
118- pd_client: & std:: sync:: Arc <impl crate :: pd:: PdClient >,
118+ pd_client: & std:: sync:: Arc <impl $ crate:: pd:: PdClient >,
119119 ) -> futures:: stream:: BoxStream <
120120 ' static ,
121- crate :: Result <( Self :: Shard , crate :: store:: RegionStore ) >,
121+ $ crate:: Result <( Self :: Shard , $ crate:: store:: RegionStore ) >,
122122 > {
123123 let mut keys = self . keys. clone( ) ;
124124 keys. sort( ) ;
125- crate :: store:: store_stream_for_keys( keys. into_iter( ) , pd_client. clone( ) )
125+ $ crate:: store:: store_stream_for_keys( keys. into_iter( ) , pd_client. clone( ) )
126126 }
127127
128128 fn apply_shard(
129129 & mut self ,
130130 shard: Self :: Shard ,
131- store: & crate :: store:: RegionStore ,
132- ) -> crate :: Result <( ) > {
131+ store: & $ crate:: store:: RegionStore ,
132+ ) -> $ crate:: Result <( ) > {
133133 self . set_context( store. region_with_leader. context( ) ?) ;
134134 self . set_keys( shard. into_iter( ) . map( Into :: into) . collect( ) ) ;
135135 Ok ( ( ) )
@@ -146,18 +146,18 @@ macro_rules! shardable_range {
146146
147147 fn shards(
148148 & self ,
149- pd_client: & Arc <impl crate :: pd:: PdClient >,
150- ) -> BoxStream <' static , crate :: Result <( Self :: Shard , crate :: store:: RegionStore ) >> {
149+ pd_client: & Arc <impl $ crate:: pd:: PdClient >,
150+ ) -> BoxStream <' static , $ crate:: Result <( Self :: Shard , $ crate:: store:: RegionStore ) >> {
151151 let start_key = self . start_key. clone( ) . into( ) ;
152152 let end_key = self . end_key. clone( ) . into( ) ;
153- crate :: store:: store_stream_for_range( ( start_key, end_key) , pd_client. clone( ) )
153+ $ crate:: store:: store_stream_for_range( ( start_key, end_key) , pd_client. clone( ) )
154154 }
155155
156156 fn apply_shard(
157157 & mut self ,
158158 shard: Self :: Shard ,
159- store: & crate :: store:: RegionStore ,
160- ) -> crate :: Result <( ) > {
159+ store: & $ crate:: store:: RegionStore ,
160+ ) -> $ crate:: Result <( ) > {
161161 self . set_context( store. region_with_leader. context( ) ?) ;
162162
163163 self . set_start_key( shard. 0 . into( ) ) ;
0 commit comments