Browse Source

Fix typos spotted by GitHub user kianmeng

pull/219/head
Paul J. Davis 3 years ago
parent
commit
b5f3d087cf
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/jiffy_utf8.erl
  2. +1
    -1
      test/jiffy_16_dedupe_keys_tests.erl

+ 1
- 1
src/jiffy_utf8.erl View File

@ -77,7 +77,7 @@ loose_decode(Bin, O, Acc) ->
<<_:O/binary, _:8/integer, R/binary>> -> <<_:O/binary, _:8/integer, R/binary>> ->
% Broken lead or continuation byte. Discard first % Broken lead or continuation byte. Discard first
% byte and all broken continuations. Replace the % byte and all broken continuations. Replace the
% whole mess with a replacment code point.
% whole mess with a replacement code point.
T = 1 + count_continuation_bytes(R, 0), T = 1 + count_continuation_bytes(R, 0),
loose_decode(Bin, O+T, [16#FFFD | Acc]) loose_decode(Bin, O+T, [16#FFFD | Acc])
end. end.

+ 1
- 1
test/jiffy_16_dedupe_keys_tests.erl View File

@ -38,7 +38,7 @@ dedupe_keys_test_() ->
{[{<<"foo">>, {[{<<"bar">>, 1}, {<<"bar">>, 2}]}}]}, {[{<<"foo">>, {[{<<"bar">>, 1}, {<<"bar">>, 2}]}}]},
{[{<<"foo">>, {[{<<"bar">>, 2}]}}]} {[{<<"foo">>, {[{<<"bar">>, 2}]}}]}
}, },
% Objets in arrays are handled
% Objects in arrays are handled
{ {
[{[{<<"foo">>, 1}, {<<"foo">>, 2}]}], [{[{<<"foo">>, 1}, {<<"foo">>, 2}]}],
[{[{<<"foo">>, 2}]}] [{[{<<"foo">>, 2}]}]

Loading…
Cancel
Save