fix: better formating for validator

This commit is contained in:
rvcas 2023-02-15 12:55:11 -05:00 committed by Lucas
parent a044c3580e
commit e647330433
1 changed files with 5 additions and 1 deletions

View File

@ -589,7 +589,11 @@ impl<'comments> Formatter<'comments> {
.to_doc() .to_doc()
.append(" ") .append(" ")
.append(fun.name.as_str()) .append(fun.name.as_str())
.append(wrap_args(params.iter().map(|e| (self.fn_arg(e), false)))); .append(if !params.is_empty() {
wrap_args(params.iter().map(|e| (self.fn_arg(e), false)))
} else {
"".to_doc()
});
// Stick it all together // Stick it all together
let inner_fn = head let inner_fn = head