rav1d 1.1.0

Rust port of the dav1d AV1 decoder
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![deny(unsafe_op_in_unsafe_fn)]

use std::hint::unreachable_unchecked;

/// A stable version of [`core::intrinsics::assume`].
///
/// # Safety
///
/// `condition` must always be `true`.
#[inline(always)]
pub const unsafe fn assume(condition: bool) {
    if !condition {
        // SAFETY: `condition` is `true` by the `# Safety` preconditions.
        unsafe { unreachable_unchecked() };
    }
}