Skip to content

Commit

Permalink
remove PayloadSize type (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Laine authored Mar 21, 2024
1 parent 230a87c commit c386102
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions firewood/src/shale/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ use std::io::{Cursor, Write};
use std::num::NonZeroUsize;
use std::sync::RwLock;

type PayLoadSize = u64;

#[derive(Debug)]
pub struct CompactHeader {
payload_size: PayLoadSize,
payload_size: u64,
is_freed: bool,
desc_addr: DiskAddress,
}
Expand Down Expand Up @@ -81,11 +79,11 @@ impl Storable for CompactHeader {

#[derive(Debug)]
struct CompactFooter {
payload_size: PayLoadSize,
payload_size: u64,
}

impl CompactFooter {
const SERIALIZED_LEN: u64 = std::mem::size_of::<PayLoadSize>() as u64;
const SERIALIZED_LEN: u64 = std::mem::size_of::<u64>() as u64;
}

impl Storable for CompactFooter {
Expand Down Expand Up @@ -113,7 +111,7 @@ impl Storable for CompactFooter {

#[derive(Clone, Copy, Debug)]
struct CompactDescriptor {
payload_size: PayLoadSize,
payload_size: u64,
haddr: usize, // disk address of the free space
}

Expand Down

0 comments on commit c386102

Please sign in to comment.