Skip to content

Commit

Permalink
debug_assert + comment typo
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatarya committed Sep 20, 2024
1 parent b13c4d6 commit 05be145
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cas_object/src/cas_chunk_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ fn write_chunk_header<W: Write>(w: &mut W, chunk_header: &CASChunkHeader) -> std

#[inline]
fn copy_three_byte_num(buf: &mut [u8; 3], num: u32) {
debug_assert!(num < 16_777_216); // verify that chunk is under 16MB
let bytes = num.to_le_bytes(); // Convert u32 to little-endian bytes
buf.copy_from_slice(&bytes[0..3]);
}
Expand Down
2 changes: 1 addition & 1 deletion cas_object/src/cas_object_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl CasObject {
///
/// Ex. If user requests range bytes 150-250 from a Xorb, and assume the following layout:
/// ```
/// // chunk: [ 0 | 1 | 2 | 3 ]
/// // chunk: [ 0 | 1 | 2 | 3 ]
/// // uncompressed chunks: [ 0-99 | 100-199 | 200-299 | 300-399 ]
/// // compressed chunks: [ 0-49 | 50-99 | 100-149 | 150-199 ]
/// ```
Expand Down

0 comments on commit 05be145

Please sign in to comment.