Skip to content

Commit

Permalink
clippy(mem_table): fix clippy::missing_transmute_annotations lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Foreverhighness committed Jun 19, 2024
1 parent 194fa6d commit e0b59c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mini-lsm-mvcc/src/mem_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit e0b59c6

Please sign in to comment.