Bytes.concat and Bytes.split #638

Merged
zxq9 merged 10 commits from bytes-concat into master 2019-09-10 02:14:00 +09:00
Showing only changes of commit 0f612ead90 - Show all commits

View File

@ -59,7 +59,8 @@ pos(File, Line, Col) ->
-spec throw(_) -> ok | no_return(). -spec throw(_) -> ok | no_return().
throw([]) -> ok; throw([]) -> ok;
throw(Errs) when is_list(Errs) -> throw(Errs) when is_list(Errs) ->
erlang:throw({error, Errs}); SortedErrs = lists:sort(fun(E1, E2) -> E1#err.pos =< E2#err.pos end, Errs),
erlang:throw({error, SortedErrs});
throw(#err{} = Err) -> throw(#err{} = Err) ->
erlang:throw({error, [Err]}). erlang:throw({error, [Err]}).