mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-29 05:51:32 +00:00
17 lines
261 B
Rust
17 lines
261 B
Rust
#[macro_use]
|
|
extern crate askama;
|
|
|
|
use askama::Template;
|
|
|
|
#[derive(Template)]
|
|
#[template(path = "let.html")]
|
|
struct LetTemplate<'a> {
|
|
s: &'a str,
|
|
}
|
|
|
|
#[test]
|
|
fn test_let() {
|
|
let t = LetTemplate { s: "foo" };
|
|
assert_eq!(t.render().unwrap(), "foo");
|
|
}
|