File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ impl TimestampExt for Timestamp {
35
35
Self {
36
36
physical : version >> PHYSICAL_SHIFT_BITS ,
37
37
logical : version & LOGICAL_MASK ,
38
- // Now we only support global transactions
39
- suffix_bits : 0 ,
38
+ // Now we only support global transactions:
39
+ // suffix_bits: 0,
40
+ ..Default :: default ( )
40
41
}
41
42
}
42
43
Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ mod tests {
436
436
|_: & dyn Any | {
437
437
fail:: fail_point!( "region-error" , |_| {
438
438
let resp = kvrpcpb:: ResolveLockResponse {
439
- region_error: Some ( errorpb:: Error :: default ( ) ) ,
439
+ region_error: Some ( errorpb:: Error :: default ( ) ) . into ( ) ,
440
440
..Default :: default ( )
441
441
} ;
442
442
Ok ( Box :: new( resp) as Box <dyn Any >)
Original file line number Diff line number Diff line change @@ -783,6 +783,7 @@ impl HasLocks for kvrpcpb::PrewriteResponse {
783
783
}
784
784
785
785
#[ cfg( test) ]
786
+ #[ cfg_attr( feature = "protobuf-codec" , allow( clippy:: useless_conversion) ) ]
786
787
mod tests {
787
788
use crate :: {
788
789
request:: { plan:: Merge , CollectWithShard , ResponseWithShard } ,
@@ -815,26 +816,26 @@ mod tests {
815
816
..Default :: default ( )
816
817
} ,
817
818
vec ! [ kvrpcpb:: Mutation {
818
- op: kvrpcpb:: Op :: PessimisticLock as i32 ,
819
+ op: kvrpcpb:: Op :: PessimisticLock . into ( ) ,
819
820
key: key2. to_vec( ) ,
820
821
..Default :: default ( )
821
822
} ] ,
822
823
) ;
823
824
824
825
let resp_not_found = ResponseWithShard (
825
826
kvrpcpb:: PessimisticLockResponse {
826
- values : vec ! [ value_empty. to_vec( ) , value4. to_vec( ) ] ,
827
+ values : vec ! [ value_empty. to_vec( ) , value4. to_vec( ) ] . into ( ) ,
827
828
not_founds : vec ! [ true , false ] ,
828
829
..Default :: default ( )
829
830
} ,
830
831
vec ! [
831
832
kvrpcpb:: Mutation {
832
- op: kvrpcpb:: Op :: PessimisticLock as i32 ,
833
+ op: kvrpcpb:: Op :: PessimisticLock . into ( ) ,
833
834
key: key3. to_vec( ) ,
834
835
..Default :: default ( )
835
836
} ,
836
837
kvrpcpb:: Mutation {
837
- op: kvrpcpb:: Op :: PessimisticLock as i32 ,
838
+ op: kvrpcpb:: Op :: PessimisticLock . into ( ) ,
838
839
key: key4. to_vec( ) ,
839
840
..Default :: default ( )
840
841
} ,
You can’t perform that action at this time.
0 commit comments