aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/rust_macro.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-10-08 10:40:20 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-10-08 10:40:20 +0200
commit35e241f429778e5b0060d3455087db37b38c921b (patch)
treed8fec164f7650322d501e4746ddbbb8611922b32 /testing/tests/rust_macro.rs
parenta6a36343e9ffad6fe0001e68e689664997d805b3 (diff)
downloadaskama-35e241f429778e5b0060d3455087db37b38c921b.tar.gz
askama-35e241f429778e5b0060d3455087db37b38c921b.tar.bz2
askama-35e241f429778e5b0060d3455087db37b38c921b.zip
Clean up warning about unused field
Diffstat (limited to 'testing/tests/rust_macro.rs')
-rw-r--r--testing/tests/rust_macro.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/testing/tests/rust_macro.rs b/testing/tests/rust_macro.rs
index c6e97ce..a9924db 100644
--- a/testing/tests/rust_macro.rs
+++ b/testing/tests/rust_macro.rs
@@ -4,19 +4,17 @@ extern crate askama;
use askama::Template;
macro_rules! hello {
- ($name:expr) => {
+ () => {
"world"
}
}
#[derive(Template)]
#[template(path = "rust-macros.html")]
-struct RustMacrosTemplate<'a> {
- name: &'a str,
-}
+struct RustMacrosTemplate {}
#[test]
fn main() {
- let template = RustMacrosTemplate { name: "foo" };
+ let template = RustMacrosTemplate {};
assert_eq!("Hello, world!", template.render().unwrap());
}