proper error message for builtin fn expecting 0 args
This commit is contained in:
parent
50778bd743
commit
355643f538
@ -37,7 +37,7 @@ macro_rules! named_arg {
|
|||||||
macro_rules! max_args {
|
macro_rules! max_args {
|
||||||
($args:ident, $count:literal) => {
|
($args:ident, $count:literal) => {
|
||||||
if $args.len() > $count {
|
if $args.len() > $count {
|
||||||
if $count > 1 {
|
if $count != 1 {
|
||||||
return Err(format!(
|
return Err(format!(
|
||||||
"Only {} arguments allowed, but {} were passed.",
|
"Only {} arguments allowed, but {} were passed.",
|
||||||
$count,
|
$count,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user