mirror of https://github.com/tikv/client-rust.git
Replace transmute following clippy's advice
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
This commit is contained in:
parent
d926300a45
commit
b13a99dd30
|
@ -120,7 +120,7 @@ impl AsRef<Key> for Key {
|
|||
|
||||
impl AsRef<Key> for Vec<u8> {
|
||||
fn as_ref(&self) -> &Key {
|
||||
unsafe { std::mem::transmute(self) }
|
||||
unsafe { &*(self as *const Vec<u8> as *const Key) }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue