Remove "unused type" warnings in tests

This commit is contained in:
Guillaume Gomez 2024-04-27 12:40:18 +02:00 committed by René Kijewski
parent ed512051cf
commit cefa443839
2 changed files with 12 additions and 0 deletions

View File

@ -331,6 +331,12 @@ fn test_flat_deep() {
#[template(path = "let-base.html")]
struct LetBase {}
#[test]
fn test_let_base() {
let t = LetBase {};
assert_eq!(t.render().unwrap(), "");
}
#[derive(Template)]
#[template(path = "let-child.html")]
struct LetChild {}

View File

@ -350,6 +350,12 @@ impl FunctionTemplate {
}
}
#[test]
fn test_fn() {
let t = FunctionTemplate;
assert_eq!(t.render().unwrap(), "Hello, world1234!");
}
#[derive(Template)]
#[template(source = " {# foo -#} ", ext = "txt")]
struct CommentTemplate {}