fix: clippy lint (#80)
* clippy(merge_iterator): fix `clippy::non_canonical_partial_ord_impl` lint. * clippy(bloom): fix `clippy::manual_clamp` lint. * clippy(compact): fix `clippy::assigning_clones` lint. * clippy(key): fix `clippy::legacy_numeric_constants` lint. * clippy(mem_table): fix `clippy::missing_transmute_annotations` lint.
This commit is contained in:
@@ -93,7 +93,7 @@ impl MemTable {
|
||||
/// Get a value by key. Should not be used in week 3.
|
||||
pub fn get(&self, key: KeySlice) -> Option<Bytes> {
|
||||
let key_bytes = KeyBytes::from_bytes_with_ts(
|
||||
Bytes::from_static(unsafe { std::mem::transmute(key.key_ref()) }),
|
||||
Bytes::from_static(unsafe { std::mem::transmute::<&[u8], &[u8]>(key.key_ref()) }),
|
||||
key.ts(),
|
||||
);
|
||||
self.map.get(&key_bytes).map(|e| e.value().clone())
|
||||
|
||||
Reference in New Issue
Block a user