mustache 0.9.0

Rust implementation of Mustache
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[cfg(test)]
macro_rules! assert_let {
    (@as_block $block:block) => { $block };
    ($pattern:pat = $thing:expr) => {
        assert_let!($pattern = $thing => {});
    };
    ($pattern:pat = $thing:expr => $($block:tt)*) => {
        match $thing {
            $pattern => assert_let!(@as_block { $($block)* }),
            ref failure => {
                panic!("assertion failed: expected `{:?}`, found `{:?}`", stringify!($pattern), failure)
            }
        }
    };
}