@@ -18,6 +18,7 @@ impl KvRequest for kvrpcpb::GetRequest {
18
18
type Result = Option < Value > ;
19
19
type RpcResponse = kvrpcpb:: GetResponse ;
20
20
type KeyData = Key ;
21
+
21
22
fn store_stream < PdC : PdClient > (
22
23
& mut self ,
23
24
pd_client : Arc < PdC > ,
@@ -60,9 +61,9 @@ impl HasLocks for kvrpcpb::GetResponse {
60
61
}
61
62
}
62
63
63
- pub fn new_mvcc_get_request ( key : impl Into < Key > , timestamp : Timestamp ) -> kvrpcpb:: GetRequest {
64
+ pub fn new_mvcc_get_request ( key : Key , timestamp : Timestamp ) -> kvrpcpb:: GetRequest {
64
65
let mut req = kvrpcpb:: GetRequest :: default ( ) ;
65
- req. set_key ( key. into ( ) . into ( ) ) ;
66
+ req. set_key ( key. into ( ) ) ;
66
67
req. set_version ( timestamp. version ( ) ) ;
67
68
req
68
69
}
@@ -72,6 +73,7 @@ impl KvRequest for kvrpcpb::BatchGetRequest {
72
73
type Result = Vec < KvPair > ;
73
74
type RpcResponse = kvrpcpb:: BatchGetResponse ;
74
75
type KeyData = Vec < Key > ;
76
+
75
77
fn make_rpc_request ( & self , keys : Self :: KeyData , store : & Store ) -> Result < Self > {
76
78
let mut req = self . request_from_store ( store) ?;
77
79
req. set_keys ( keys. into_iter ( ) . map ( Into :: into) . collect ( ) ) ;
@@ -153,12 +155,12 @@ impl KvRequest for kvrpcpb::ScanRequest {
153
155
}
154
156
155
157
pub fn new_mvcc_scan_request (
156
- range : impl Into < BoundRange > ,
158
+ range : BoundRange ,
157
159
timestamp : Timestamp ,
158
160
limit : u32 ,
159
161
key_only : bool ,
160
162
) -> kvrpcpb:: ScanRequest {
161
- let ( start_key, end_key) = range. into ( ) . into_keys ( ) ;
163
+ let ( start_key, end_key) = range. into_keys ( ) ;
162
164
let mut req = kvrpcpb:: ScanRequest :: default ( ) ;
163
165
req. set_start_key ( start_key. into ( ) ) ;
164
166
req. set_end_key ( end_key. unwrap_or_default ( ) . into ( ) ) ;
@@ -574,7 +576,7 @@ impl KvRequest for kvrpcpb::PessimisticLockRequest {
574
576
}
575
577
576
578
pub fn new_pessimistic_lock_request (
577
- keys : Vec < impl Into < Key > > ,
579
+ keys : Vec < Key > ,
578
580
primary_lock : Key ,
579
581
start_version : u64 ,
580
582
lock_ttl : u64 ,
@@ -587,7 +589,7 @@ pub fn new_pessimistic_lock_request(
587
589
. map ( |key| {
588
590
let mut mutation = kvrpcpb:: Mutation :: default ( ) ;
589
591
mutation. set_op ( kvrpcpb:: Op :: PessimisticLock ) ;
590
- mutation. set_key ( key. into ( ) . into ( ) ) ;
592
+ mutation. set_key ( key. into ( ) ) ;
591
593
mutation
592
594
} )
593
595
. collect ( ) ;
@@ -640,12 +642,12 @@ impl KvRequest for kvrpcpb::ScanLockRequest {
640
642
}
641
643
642
644
pub fn new_scan_lock_request (
643
- start_key : impl Into < Key > ,
645
+ start_key : Key ,
644
646
safepoint : Timestamp ,
645
647
limit : u32 ,
646
648
) -> kvrpcpb:: ScanLockRequest {
647
649
let mut req = kvrpcpb:: ScanLockRequest :: default ( ) ;
648
- req. set_start_key ( start_key. into ( ) . into ( ) ) ;
650
+ req. set_start_key ( start_key. into ( ) ) ;
649
651
req. set_max_version ( safepoint. version ( ) ) ;
650
652
req. set_limit ( limit) ;
651
653
req
0 commit comments