mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-29 05:51:32 +00:00
Linted
This commit is contained in:
parent
cf4f514d7e
commit
0d8373e3b2
@ -146,15 +146,19 @@ fn test_has_rest_pattern() {
|
||||
assert_eq!(t.render().unwrap(), "hello 0hello 1hello 0");
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct X {
|
||||
a: u32,
|
||||
b: u32,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(source = "
|
||||
#[template(
|
||||
source = "
|
||||
{%- if let X { a, .. } = x -%}hello {{ a }}{%- endif -%}
|
||||
", ext = "html")]
|
||||
",
|
||||
ext = "html"
|
||||
)]
|
||||
struct T1 {
|
||||
x: X,
|
||||
}
|
||||
@ -168,9 +172,12 @@ fn test_t1() {
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(source = "
|
||||
#[template(
|
||||
source = "
|
||||
{%- if let X { .. } = x -%}hello{%- endif -%}
|
||||
", ext = "html")]
|
||||
",
|
||||
ext = "html"
|
||||
)]
|
||||
struct T2 {
|
||||
x: X,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user