finquant 0.0.57

Experimental Rust Quant Library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// Unwrap options at compile-time.
///
/// This is necessary as unwrap and expect on Options are not stabilised yet.
/// While this macro works in non-const contexts as well, there is no point using it
/// in that manner.
macro_rules! const_unwrap {
    ($expr:expr) => {
        match $expr {
            Some(val) => val,
            None => panic!("expected some value"),
        }
    };
}

pub(crate) use const_unwrap;