From 35e241f429778e5b0060d3455087db37b38c921b Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 8 Oct 2018 10:40:20 +0200 Subject: Clean up warning about unused field --- testing/tests/rust_macro.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'testing/tests/rust_macro.rs') 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()); } -- cgit