Skip to content

Commit 5ea2069

Browse files
ansdmichaelklishin
authored andcommitted
Use byte_size/1 instead of size/1
1 parent 5a7b120 commit 5ea2069

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deps/amqp10_common/src/amqp10_binary_generator.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ constructor(array) -> 16#f0; % use large array type for all nested arrays
204204
constructor({described, Descriptor, Primitive}) ->
205205
[16#00, generate1(Descriptor), constructor(Primitive)].
206206

207-
generate2(symbol, {symbol, V}) -> [<<(size(V)):32>>, V];
208-
generate2(utf8, {utf8, V}) -> [<<(size(V)):32>>, V];
209-
generate2(binary, {binary, V}) -> [<<(size(V)):32>>, V];
207+
generate2(symbol, {symbol, V}) -> [<<(byte_size(V)):32>>, V];
208+
generate2(utf8, {utf8, V}) -> [<<(byte_size(V)):32>>, V];
209+
generate2(binary, {binary, V}) -> [<<(byte_size(V)):32>>, V];
210210
generate2(boolean, true) -> 16#01;
211211
generate2(boolean, false) -> 16#00;
212212
generate2(boolean, {boolean, true}) -> 16#01;

0 commit comments

Comments
 (0)