templater: rename TemplateFunction::new() parameter for consistency

This commit is contained in:
Yuya Nishihara 2023-01-26 16:32:44 +09:00
parent 2c4856c47b
commit bfb56614d4

View file

@ -441,15 +441,12 @@ pub struct TemplateFunction<P, F> {
} }
impl<P, F> TemplateFunction<P, F> { impl<P, F> TemplateFunction<P, F> {
pub fn new<C, O>(template: P, function: F) -> Self pub fn new<C, O>(property: P, function: F) -> Self
where where
P: TemplateProperty<C>, P: TemplateProperty<C>,
F: Fn(P::Output) -> O, F: Fn(P::Output) -> O,
{ {
TemplateFunction { TemplateFunction { property, function }
property: template,
function,
}
} }
} }