1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use askama::Template; #[derive(Template)] #[template( ext = "txt", source = r#" {%- match good -%} // Help, I forgot how to write comments! {%- when true %} good {%- when _ -%} bad {%- endmatch -%}"# )] struct MatchWithExtra { good: bool, } fn main() { }