diff options
author | Nelson Vides <videsnelson@gmail.com> | 2021-04-07 16:32:39 +0200 |
---|---|---|
committer | Nelson Vides <videsnelson@gmail.com> | 2021-04-07 16:32:39 +0200 |
commit | 5786568adeabc7c78b4e86479bf2f3efe92242b5 (patch) | |
tree | 527a862342baa14d0758f7a019f98a505f183ff6 | |
parent | 02dfd48466334d88e67e71dd30625e438dea0463 (diff) | |
download | erlang-5786568adeabc7c78b4e86479bf2f3efe92242b5.tar.gz |
Unify approach for function heads
-rw-r--r-- | lib/stdlib/src/binary.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stdlib/src/binary.erl b/lib/stdlib/src/binary.erl index e01f46a54d..7bfca5084c 100644 --- a/lib/stdlib/src/binary.erl +++ b/lib/stdlib/src/binary.erl @@ -369,7 +369,7 @@ get_opts_replace(_,_) -> -spec encode_hex(Bin) -> Bin2 when Bin :: binary(), Bin2 :: <<_:_*16>>. -encode_hex(Data) when byte_size(Data) band 7 =:= 0 -> +encode_hex(Data) when byte_size(Data) rem 8 =:= 0 -> << <<?HEX(A),?HEX(B),?HEX(C),?HEX(D),?HEX(E),?HEX(F),?HEX(G),?HEX(H)>> || <<A,B,C,D,E,F,G,H>> <= Data >>; encode_hex(Data) when byte_size(Data) rem 7 =:= 0 -> << <<?HEX(A),?HEX(B),?HEX(C),?HEX(D),?HEX(E),?HEX(F),?HEX(G)>> || <<A,B,C,D,E,F,G>> <= Data >>; |