Skip to content

Commit cd49844

Browse files
committed
polish
Signed-off-by: Ping Yu <yuping@pingcap.com>
1 parent 2e96fd9 commit cd49844

File tree

5 files changed

+3
-14
lines changed

5 files changed

+3
-14
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ unit-test:
2828
cargo test --all --no-default-features --features "${ENABLE_FEATURES}"
2929

3030
integration-test:
31-
# MULTI_REGION shall be set manually if needed
3231
cargo test txn_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture
3332
cargo test raw_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture
3433
cargo test misc_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture

src/request/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ mod test {
182182
|_: &dyn Any| {
183183
Ok(Box::new(kvrpcpb::CommitResponse {
184184
error: Some(kvrpcpb::KeyError::default()).into(),
185-
commit_version: 0,
186185
..Default::default()
187186
}) as Box<dyn Any>)
188187
},

src/timestamp.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ impl TimestampExt for Timestamp {
3535
Self {
3636
physical: version >> PHYSICAL_SHIFT_BITS,
3737
logical: version & LOGICAL_MASK,
38-
// Now we only support global transactions:
39-
// suffix_bits: 0,
38+
// Now we only support global transactions: suffix_bits: 0,
4039
..Default::default()
4140
}
4241
}

src/transaction/lock.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,10 @@ impl LockResolver {
312312
let mut txn_ids = Vec::with_capacity(txn_infos.len());
313313
let mut txn_info_vec = Vec::with_capacity(txn_infos.len());
314314
for (txn_id, commit_ts) in txn_infos.into_iter() {
315+
txn_ids.push(txn_id);
315316
let mut txn_info = TxnInfo::default();
316317
txn_info.set_txn(txn_id);
317318
txn_info.set_status(commit_ts);
318-
319-
txn_ids.push(txn_id);
320319
txn_info_vec.push(txn_info);
321320
}
322321
let cleaned_region = self

tikv-client-store/src/errors.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,18 +223,11 @@ mod test {
223223
use tikv_client_proto::kvrpcpb;
224224
#[test]
225225
fn result_haslocks() {
226-
let mut resp: Result<_, Error> = Ok(kvrpcpb::CommitResponse {
227-
region_error: None.into(),
228-
error: None.into(),
229-
commit_version: 0,
230-
..Default::default()
231-
});
226+
let mut resp: Result<_, Error> = Ok(kvrpcpb::CommitResponse::default());
232227
assert!(resp.key_errors().is_none());
233228

234229
let mut resp: Result<_, Error> = Ok(kvrpcpb::CommitResponse {
235-
region_error: None.into(),
236230
error: Some(kvrpcpb::KeyError::default()).into(),
237-
commit_version: 0,
238231
..Default::default()
239232
});
240233
assert!(resp.key_errors().is_some());

0 commit comments

Comments
 (0)