mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
getopt optimization and dialyzer fix from Kostis
This commit is contained in:
parent
933e4f7620
commit
7200d18671
1 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@
|
||||||
-define(OPT_ARG, 4).
|
-define(OPT_ARG, 4).
|
||||||
-define(OPT_HELP, 5).
|
-define(OPT_HELP, 5).
|
||||||
|
|
||||||
-define(IS_OPT_SPEC(Opt), (is_tuple(Opt) andalso (size(Opt) =:= ?OPT_HELP))).
|
-define(IS_OPT_SPEC(Opt), (tuple_size(Opt) =:= ?OPT_HELP)).
|
||||||
|
|
||||||
|
|
||||||
%% Atom indicating the data type that an argument can be converted to.
|
%% Atom indicating the data type that an argument can be converted to.
|
||||||
|
@ -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…
Reference in a new issue