Skip to content

Commit a440794

Browse files
committed
fix fmt check
Signed-off-by: iosmanthus <[email protected]>
1 parent 59002d1 commit a440794

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/kv/key.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ use crate::kv::codec::{self, BytesEncoder};
77
use proptest::{arbitrary::any_with, collection::size_range};
88
#[cfg(test)]
99
use proptest_derive::Arbitrary;
10-
use std::{fmt, ops::Bound, u8};
11-
use std::ops::{Deref, DerefMut};
10+
use std::{
11+
fmt,
12+
ops::{Bound, Deref, DerefMut},
13+
u8,
14+
};
1215
use tikv_client_proto::kvrpcpb;
1316

1417
const _PROPTEST_KEY_MAX: usize = 1024 * 2; // 2 KB
@@ -193,4 +196,4 @@ impl DerefMut for Key {
193196
fn deref_mut(&mut self) -> &mut Self::Target {
194197
&mut self.0
195198
}
196-
}
199+
}

tikv-client-common/src/errors.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,16 @@ pub enum Error {
9393
inner: Box<Error>,
9494
success_keys: Vec<Vec<u8>>,
9595
},
96-
#[error("Corrupted keyspace: expected: {:?}, actual: {:?}, key: {:?}" , expected, actual, key)]
96+
#[error(
97+
"Corrupted keyspace: expected: {:?}, actual: {:?}, key: {:?}",
98+
expected,
99+
actual,
100+
key
101+
)]
97102
CorruptedKeyspace {
98103
expected: Vec<u8>,
99104
actual: Vec<u8>,
100-
key: Vec<u8>
105+
key: Vec<u8>,
101106
},
102107
}
103108

0 commit comments

Comments
 (0)