From d60ee33c4b699114b651cb5ea9b5e45a85c53ed1 Mon Sep 17 00:00:00 2001 From: Roberto Aloi Date: Fri, 5 Jun 2026 02:26:33 -0700 Subject: [PATCH] Require OTP 27 as minimum version (#5) Summary: Pull Request resolved: https://github.com/WhatsApp/assert/pull/5 Differential Revision: D107631858 --- rebar.config | 6 +++--- src/wa_diff.erl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rebar.config b/rebar.config index aba9c7f..e0778b1 100644 --- a/rebar.config +++ b/rebar.config @@ -12,7 +12,7 @@ {diffy, "1.1.2"} ]}. -{minimum_otp_vsn, "26"}. +{minimum_otp_vsn, "27"}. {erlfmt, [ write, @@ -52,6 +52,6 @@ {hex, [{doc, ex_doc}]}. {ex_doc, [ - {extras, [~"README.md", ~"LICENSE.md"]}, - {main, ~"README.md"} + {extras, [<<"README.md">>, <<"LICENSE.md">>]}, + {main, <<"README.md">>} ]}. diff --git a/src/wa_diff.erl b/src/wa_diff.erl index 72727de..b18e812 100644 --- a/src/wa_diff.erl +++ b/src/wa_diff.erl @@ -308,7 +308,7 @@ expand_tuple([Name | Values], #{records := Records} = _Context) when is_atom(Nam not_found -> not_found; Fields -> - {Name, #{K => V || K <:- Fields && V <:- Values}} + {Name, maps:from_list(lists:zip(Fields, Values))} end; expand_tuple(_, _) -> not_found. @@ -356,7 +356,7 @@ safe_to_algebra(#{contents := Contents}, DiffWrapper) -> ({true, Content}) -> DiffWrapper(Content) end, - erlfmt_algebra:concat([Fun(Elem) || Elem <:- Contents]); + erlfmt_algebra:concat([Fun(Elem) || Elem <- Contents]); safe_to_algebra(Literal, _DiffWrapper) -> erlfmt_algebra:string(inspect(Literal)).