mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 13:30:59 +00:00
18 lines
296 B
Rust
18 lines
296 B
Rust
use askama::Template;
|
|
|
|
macro_rules! hello {
|
|
() => {
|
|
"world"
|
|
};
|
|
}
|
|
|
|
#[derive(Template)]
|
|
#[template(path = "rust-macros.html")]
|
|
struct RustMacrosTemplate {}
|
|
|
|
#[test]
|
|
fn main() {
|
|
let template = RustMacrosTemplate {};
|
|
assert_eq!("Hello, world!", template.render().unwrap());
|
|
}
|