Skip to content

Commit

Permalink
fix naming of param
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Sep 26, 2024
1 parent 98525a6 commit faa7041
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/segment/block_index/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,12 @@ impl Writer {
Ok(())
}

pub fn register_block(&mut self, start_key: UserKey, offset: u64) -> crate::Result<()> {
pub fn register_block(&mut self, end_key: UserKey, offset: u64) -> crate::Result<()> {
// NOTE: Truncation is OK, because a key is bound by 65535 bytes, so can never exceed u32s
#[allow(clippy::cast_possible_truncation)]
let block_handle_size = (start_key.len() + std::mem::size_of::<KeyedBlockHandle>()) as u32;
let block_handle_size = (end_key.len() + std::mem::size_of::<KeyedBlockHandle>()) as u32;

let block_handle = KeyedBlockHandle {
end_key: start_key,
offset,
};
let block_handle = KeyedBlockHandle { end_key, offset };

self.block_handles.push(block_handle);

Expand Down

0 comments on commit faa7041

Please sign in to comment.