Skip to content

Commit

Permalink
Run cargo fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
mrswastik-robot committed Dec 25, 2024
1 parent c873193 commit 37e126a
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/rust/lib_ccxr/src/common/bitstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,19 +279,15 @@ pub extern "C" fn ccxr_next_bits(bs: *mut Bitstream<'static>, bnum: u32) -> u64
if bs.is_null() {
return 0;
}
unsafe {
(*bs).next_bits(bnum).unwrap_or_default()
}
unsafe { (*bs).next_bits(bnum).unwrap_or_default() }
}

#[no_mangle]
pub extern "C" fn ccxr_read_bits(bs: *mut Bitstream<'static>, bnum: u32) -> u64 {
if bs.is_null() {
return 0;
}
unsafe {
(*bs).read_bits(bnum).unwrap_or_default()
}
unsafe { (*bs).read_bits(bnum).unwrap_or_default() }
}

#[no_mangle]
Expand Down Expand Up @@ -362,19 +358,15 @@ pub extern "C" fn ccxr_read_exp_golomb_unsigned(bs: *mut Bitstream<'static>) ->
if bs.is_null() {
return 0;
}
unsafe {
(*bs).read_exp_golomb_unsigned().unwrap_or_default()
}
unsafe { (*bs).read_exp_golomb_unsigned().unwrap_or_default() }
}

#[no_mangle]
pub extern "C" fn ccxr_read_exp_golomb(bs: *mut Bitstream<'static>) -> i64 {
if bs.is_null() {
return 0;
}
unsafe {
(*bs).read_exp_golomb().unwrap_or_default()
}
unsafe { (*bs).read_exp_golomb().unwrap_or_default() }
}

#[no_mangle]
Expand Down

0 comments on commit 37e126a

Please sign in to comment.