Skip to content

Commit

Permalink
Update arrow-data/src/byte_view.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Xiangpeng Hao <haoxiangpeng123@gmail.com>
  • Loading branch information
alamb and XiangpengHao authored Oct 1, 2024
1 parent 179c1ca commit 338d7f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arrow-data/src/byte_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ impl ByteView {
/// If the prefix is not exactly 4 bytes
#[inline]
pub fn new(length: u32, prefix: &[u8]) -> Self {
debug_assert!(length > 12);
Self {
length,
prefix: u32::from_le_bytes(prefix.try_into().unwrap()),
Expand Down

0 comments on commit 338d7f7

Please sign in to comment.