diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-20 23:32:30 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-20 23:32:30 +0100 |
| commit | ddada4509729b0b8dcc394737d7eec588df51040 (patch) | |
| tree | 828a84eea9488f14878bf0ca16ee121e20a9de29 /src/model/cast.rs | |
| parent | 46d469f4bee6afd6b0d7dfdb3f095b98b18ac5f9 (diff) | |
Tracepoints for show rules
Diffstat (limited to 'src/model/cast.rs')
| -rw-r--r-- | src/model/cast.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/model/cast.rs b/src/model/cast.rs index d2e10a1f..d5b4893d 100644 --- a/src/model/cast.rs +++ b/src/model/cast.rs @@ -194,7 +194,12 @@ castable! { Value::None => Self::Content(Content::empty()), Value::Str(text) => Self::Content(item!(text)(text.into())), Value::Content(content) => Self::Content(content), - Value::Func(func) => Self::Func(func), + Value::Func(func) => { + if func.argc().map_or(false, |count| count != 1) { + Err("function must have exactly one parameter")? + } + Self::Func(func) + }, } dynamic! { |
