Avoid unnecessary construction of deep strings
Especially when the -spec specifies that a string() is returned.
This commit is contained in:
parent
8f54692a29
commit
76cebab9a9
@ -456,10 +456,10 @@ usage_options_reverse([{Name, Short, Long, _ArgSpec, Help} | Tail], Acc) ->
|
||||
case Short of
|
||||
% Only long form.
|
||||
undefined ->
|
||||
[$-, $-, Long];
|
||||
[$-, $- | Long];
|
||||
% Both short and long form.
|
||||
_ ->
|
||||
[$-, Short, $,, $\s, $-, $-, Long]
|
||||
[$-, Short, $,, $\s, $-, $- | Long]
|
||||
end
|
||||
end,
|
||||
usage_options_reverse(Tail, add_option_help(Prefix, Help, Acc));
|
||||
|
Loading…
x
Reference in New Issue
Block a user