Skip to content

Commit

Permalink
Merge pull request #4480 from epage/panic
Browse files Browse the repository at this point in the history
fix: Don't panic on non-built arg rendering
  • Loading branch information
epage committed Nov 14, 2022
2 parents 95144b7 + c939de8 commit 8171a5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/builder/arg.rs
Expand Up @@ -4183,7 +4183,7 @@ impl Arg {
fn render_arg_val(&self, required: bool) -> String {
let mut rendered = String::new();

let num_vals = self.get_num_args().expect(INTERNAL_ERROR_MSG);
let num_vals = self.get_num_args().unwrap_or_else(|| 1.into());

let mut val_names = if self.val_names.is_empty() {
vec![self.id.as_internal_str().to_owned()]
Expand Down

0 comments on commit 8171a5f

Please sign in to comment.