mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-02 15:25:19 +00:00
Remove type parameter defaults from impls (fixes #12)
This commit is contained in:
parent
9397378e4e
commit
ed89e5f027
@ -334,7 +334,9 @@ impl<'a> Generator<'a> {
|
|||||||
full_anno.append(",");
|
full_anno.append(",");
|
||||||
orig_anno.append(",");
|
orig_anno.append(",");
|
||||||
}
|
}
|
||||||
param.to_tokens(&mut full_anno);
|
let mut impl_param = param.clone();
|
||||||
|
impl_param.default = None;
|
||||||
|
impl_param.to_tokens(&mut full_anno);
|
||||||
param.ident.to_tokens(&mut orig_anno);
|
param.ident.to_tokens(&mut orig_anno);
|
||||||
sep = true;
|
sep = true;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,8 @@ fn test_option() {
|
|||||||
|
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
#[template(path = "generics.html")]
|
#[template(path = "generics.html")]
|
||||||
struct GenericsTemplate<T: std::fmt::Display, U> where U: std::fmt::Display {
|
struct GenericsTemplate<T: std::fmt::Display, U = u8>
|
||||||
|
where U: std::fmt::Display {
|
||||||
t: T,
|
t: T,
|
||||||
u: U,
|
u: U,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user