From df7be43ab629fc0cb1365e841ccd6f8f58dc9f43 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Sat, 23 Mar 2024 11:40:49 +0900 Subject: [PATCH] templater: update comment why Template isn't TemplateProperty They are similar in a way that both of them can represent dynamic/static evaluation, but their behaviors are different in error handling. --- cli/src/template_builder.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/cli/src/template_builder.rs b/cli/src/template_builder.rs index 03b9426997..b991e80d0a 100644 --- a/cli/src/template_builder.rs +++ b/cli/src/template_builder.rs @@ -134,11 +134,16 @@ pub enum CoreTemplatePropertyKind<'a> { Timestamp(Box + 'a>), TimestampRange(Box + 'a>), - // TODO: This argument no longer makes sense. Maybe we can migrate these to - // TemplateProperty<..>: - // Similar to `TemplateProperty + 'a>`, but doesn't - // capture `I` to produce `Template<()>`. The context `I` would have to be cloned - // to convert `Template` to `Template<()>`. + // Both TemplateProperty and Template can represent a value to be evaluated + // dynamically, which suggests that `Box` could be + // composed as `Box), ListTemplate(Box), }