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
|
case Short of
|
||||||
% Only long form.
|
% Only long form.
|
||||||
undefined ->
|
undefined ->
|
||||||
[$-, $-, Long];
|
[$-, $- | Long];
|
||||||
% Both short and long form.
|
% Both short and long form.
|
||||||
_ ->
|
_ ->
|
||||||
[$-, Short, $,, $\s, $-, $-, Long]
|
[$-, Short, $,, $\s, $-, $- | Long]
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
usage_options_reverse(Tail, add_option_help(Prefix, Help, Acc));
|
usage_options_reverse(Tail, add_option_help(Prefix, Help, Acc));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user