aboutsummaryrefslogtreecommitdiff
path: root/src/gleam_stdlib.erl
diff options
context:
space:
mode:
authorsobolevn <mail@sobolevn.me>2024-08-20 21:34:59 +0300
committerLouis Pilfold <louis@lpil.uk>2024-08-24 13:07:53 +0100
commit644a7ae5a8823697808f9b3746774994c0f04990 (patch)
tree28334eb4da8c501ae68dd0558d95463321b6f09b /src/gleam_stdlib.erl
parente57ea3d5b73f9143071941ec0da0b6c38de7d86a (diff)
downloadgleam_stdlib-644a7ae5a8823697808f9b3746774994c0f04990.tar.gz
gleam_stdlib-644a7ae5a8823697808f9b3746774994c0f04990.zip
Partially address review
Diffstat (limited to 'src/gleam_stdlib.erl')
-rw-r--r--src/gleam_stdlib.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl
index 96a35b7..1fc15b2 100644
--- a/src/gleam_stdlib.erl
+++ b/src/gleam_stdlib.erl
@@ -14,7 +14,7 @@
decode_tuple5/1, decode_tuple6/1, tuple_get/2, classify_dynamic/1, print/1,
println/1, print_error/1, println_error/1, inspect/1, float_to_string/1,
int_from_base_string/2, utf_codepoint_list_to_string/1, contains_string/2,
- crop_string/2, base16_decode/1, string_replace/3, regex_replace/3, slice/3, bit_array_to_int/1
+ crop_string/2, base16_decode/1, string_replace/3, regex_replace/3, slice/3, bit_array_to_int_and_size/1
]).
%% Taken from OTP's uri_string module
@@ -492,10 +492,10 @@ inspect_bit_array(Rest, Acc) ->
Segment = <<X1/binary, ":size(", Size1/binary, ")">>,
inspect_bit_array(<<>>, append_segment(Acc, Segment)).
-bit_array_to_int(A) ->
+bit_array_to_int_and_size(A) ->
Size = bit_size(A),
<<A1:Size>> = A,
- A1.
+ {A1, Size}.
append_segment(<<"<<">>, Segment) ->
<<"<<", Segment/binary>>;