Skip to content

Commit 6baaa94

Browse files
committed
remove impl Deref for Key
Signed-off-by: iosmanthus <[email protected]>
1 parent 7fc61ea commit 6baaa94

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/kv/key.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ 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::{
11-
fmt,
12-
ops::{Bound, Deref, DerefMut},
13-
u8,
14-
};
10+
use std::{fmt, ops::Bound, u8};
1511
use tikv_client_proto::kvrpcpb;
1612

1713
const _PROPTEST_KEY_MAX: usize = 1024 * 2; // 2 KB
@@ -183,17 +179,3 @@ impl fmt::Debug for Key {
183179
write!(f, "Key({})", HexRepr(&self.0))
184180
}
185181
}
186-
187-
impl Deref for Key {
188-
type Target = Vec<u8>;
189-
190-
fn deref(&self) -> &Self::Target {
191-
&self.0
192-
}
193-
}
194-
195-
impl DerefMut for Key {
196-
fn deref_mut(&mut self) -> &mut Self::Target {
197-
&mut self.0
198-
}
199-
}

0 commit comments

Comments
 (0)