la-stack 0.4.2

Fast, stack-allocated linear algebra for fixed dimensions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#![forbid(unsafe_code)]
#![allow(dead_code)]

fn benchmark_and_example_fixture(result: Result<u32, &'static str>, value: Option<u32>) {
    // ruleid: la-stack.rust.no-unwrap-expect-in-benches-examples
    let _ = result.unwrap();

    // ruleid: la-stack.rust.no-unwrap-expect-in-benches-examples
    let _ = value.expect("benchmarks and examples should avoid expect");

    // ok: la-stack.rust.no-unwrap-expect-in-benches-examples
    let _ = result.unwrap_or(0);
}