Skip to content

Commit

Permalink
panic on invalid TxfmSize constant discriminant
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Jul 18, 2024
1 parent 29d4351 commit 749e7f0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,7 @@ impl BlockSize {

pub const fn dav1d_txfm_size<const TX: usize>() -> TxfmSize {
let Some(size) = TxfmSize::from_repr(TX) else {
unsafe {
std::hint::unreachable_unchecked();
}
panic!("invalid `TxfmSize` discriminant");
};
size
}
Expand Down

0 comments on commit 749e7f0

Please sign in to comment.