Skip to content

Commit 789cd78

Browse files
committed
chore: fix compile-time warning of Elixir 1.18
1 parent ff52034 commit 789cd78

File tree

11 files changed

+132
-126
lines changed

11 files changed

+132
-126
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## [Unreleased]
44

5+
## [0.2.2] (2025-11-05)
6+
7+
### Fixed
8+
9+
- Warnings emitted by Elixir 1.18/OTP 27
10+
511
## [0.2.1] (2024-03-12)
612

713
### Fixed

lib/dkim.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule DKIM do
1111
nil -> :none
1212
sig ->
1313
if (sig.bh == body_hash(body,sig)) do
14-
case :inet_res.lookup('#{sig.s}._domainkey.#{sig.d}', :in, :txt, edns: 0) do
14+
case :inet_res.lookup(~c"#{sig.s}._domainkey.#{sig.d}", :in, :txt, edns: 0) do
1515
[rec|_] ->
1616
pubkey = MimeMail.Params.parse_header(IO.chardata_to_string(rec))
1717
if :"#{pubkey[:k]||"rsa"}" == sig.a.sig do

lib/dmarc.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule DMARC do
1111

1212
:ssl.start ; :inets.start
1313
url = "https://publicsuffix.org/list/effective_tld_names.dat"
14-
case :httpc.request(:get,{'#{url}',[]},[], body_format: :binary) do
14+
case :httpc.request(:get,{~c"#{url}",[]},[], body_format: :binary) do
1515
{:ok,{{_,200,_},_,r}} ->
1616
Logger.debug("Download suffix from #{url}")
1717
r

lib/mime_types.ex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defmodule MimeTypes do
22
:ssl.start ; :inets.start
3-
{ext2mime,mime2ext} = case :httpc.request('https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types') do
3+
{ext2mime,mime2ext} = case :httpc.request(~c"https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types") do
44
{:ok,{{_,200,_},_,r}} -> "#{r}"
55
_ -> File.read!("#{:code.priv_dir(:mailibex)}/mime.types")
66
end
@@ -55,11 +55,11 @@ defmodule MimeTypes do
5555
{:ok,files} = :zip.zip_list_dir(ziph)
5656
files = for {:zip_file,name,_,_,_,_}<-files, do: name
5757
res = cond do
58-
Enum.all?(['[Content_Types].xml','word/styles.xml'],&(&1 in files))-> ".docx"
59-
Enum.all?(['[Content_Types].xml','xl/styles.xml'],&(&1 in files))-> ".xlsx"
60-
Enum.all?(['[Content_Types].xml','ppt/presProps.xml'],&(&1 in files))-> ".pptx"
61-
Enum.all?(['content.xml','styles.xml','META-INF/manifest.xml'],&(&1 in files))->
62-
{:ok,{_,manifest}}=:zip.zip_get('META-INF/manifest.xml',ziph)
58+
Enum.all?([~c"[Content_Types].xml",~c"word/styles.xml"],&(&1 in files))-> ".docx"
59+
Enum.all?([~c"[Content_Types].xml",~c"xl/styles.xml"],&(&1 in files))-> ".xlsx"
60+
Enum.all?([~c"[Content_Types].xml",~c"ppt/presProps.xml"],&(&1 in files))-> ".pptx"
61+
Enum.all?([~c"content.xml",~c"styles.xml",~c"META-INF/manifest.xml"],&(&1 in files))->
62+
{:ok,{_,manifest}}=:zip.zip_get(~c"META-INF/manifest.xml",ziph)
6363
case Regex.run(~r/media-type="([^"]*)"/,manifest) do #"
6464
[_,"application/vnd.oasis.opendocument.text"]->".odt"
6565
[_,"application/vnd.oasis.opendocument.presentation"]->".odp"
@@ -71,7 +71,7 @@ defmodule MimeTypes do
7171
[_,"application/vnd.oasis.opendocument.base"]->".odb"
7272
[_,"application/vnd.oasis.opendocument.database"]->".odb"
7373
end
74-
'META-INF/MANIFEST.MF' in files->".jar"
74+
~c"META-INF/MANIFEST.MF" in files->".jar"
7575
true -> ".zip"
7676
end
7777
:zip.zip_close(ziph)
@@ -164,7 +164,7 @@ defmodule EBML do
164164
:calendar.now_to_datetime {div(ts,1_000_000),rem(ts,1_000_000),0}
165165
end
166166

167-
ebml_spec = case :httpc.request('https://raw.githubusercontent.com/Matroska-Org/foundation-source/master/spectool/specdata.xml') do
167+
ebml_spec = case :httpc.request(~c"https://raw.githubusercontent.com/Matroska-Org/foundation-source/master/spectool/specdata.xml") do
168168
{:ok,{{_,200,_},_,r}} -> "#{r}"
169169
_ -> File.read!("#{:code.priv_dir(:mailibex)}/ebml.xml")
170170
end

lib/mimemail.ex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ defmodule MimeMail do
5353
escaped_bound = Regex.escape(bound)
5454
body
5555
|> String.split(~r"\s*--#{escaped_bound}\s*")
56-
|> Enum.slice(1..-2)
56+
|> Enum.slice(1..-2//-1)
5757
|> Enum.map(&from_string/1)
5858
|> Enum.map(&decode_body/1)
5959
{"text/"<>_,%{charset: charset}} ->
@@ -70,13 +70,13 @@ defmodule MimeMail do
7070
case mail.headers[:'content-type'] do
7171
{"text/"<>_=type,params}->
7272
headers = Keyword.drop(mail.headers,[:'content-type',:'content-transfer-encoding']) ++[
73-
'content-type': {type,Map.put(params,:charset,"utf-8")},
74-
'content-transfer-encoding': "quoted-printable"
73+
{:"content-type", {type,Map.put(params,:charset,"utf-8")}},
74+
{:"content-transfer-encoding", "quoted-printable"}
7575
]
7676
%{mail|headers: headers, body: {:raw,string_to_qp(body)}}
7777
_->
7878
headers = Keyword.delete(mail.headers,:'content-transfer-encoding')
79-
++['content-transfer-encoding': "base64"]
79+
++[{:"content-transfer-encoding", "base64"}]
8080
%{mail|headers: headers, body: {:raw,(body |> Base.encode64 |> chunk64 |> Enum.join("\r\n"))}}
8181
end
8282
end
@@ -86,7 +86,7 @@ defmodule MimeMail do
8686
full_boundary = "--#{boundary}"
8787
{"multipart/"<>_=type,params} = mail.headers[:'content-type']
8888
headers = Keyword.delete(mail.headers,:'content-type')
89-
++['content-type': {type,Map.put(params,:boundary,boundary)}]
89+
++[{:"content-type", {type,Map.put(params,:boundary,boundary)}}]
9090
body = childs |> Enum.map(&MimeMail.to_string/1) |> Enum.join("\r\n\r\n"<>full_boundary<>"\r\n")
9191
%{mail|body: {:raw,"#{full_boundary}\r\n#{body}\r\n\r\n#{full_boundary}--\r\n"}, headers: headers}
9292
end
@@ -96,7 +96,7 @@ defmodule MimeMail do
9696

9797
def string_to_qp(str) do
9898
str |> String.split("\r\n") |> Enum.map(fn line->
99-
{eol,line} = '#{line}' |> Enum.reverse |> Enum.split_while(&(&1==?\t or &1==?\s))
99+
{eol,line} = ~c"#{line}" |> Enum.reverse |> Enum.split_while(&(&1==?\t or &1==?\s))
100100
Enum.concat(Enum.map(eol,&char_to_qp/1),Enum.map(line,fn
101101
c when c == ?\t or (c < 127 and c > 31 and c !== ?=) -> c
102102
c -> char_to_qp(c)
@@ -172,7 +172,7 @@ end
172172
defmodule Iconv do
173173
@on_load :init
174174
def init do
175-
ret = :erlang.load_nif('#{:code.priv_dir(:mailibex)}/Elixir.Iconv_nif',0)
175+
ret = :erlang.load_nif(~c"#{:code.priv_dir(:mailibex)}/Elixir.Iconv_nif",0)
176176
case ret do
177177
{:error, {:load_failed, _} }->
178178
if Code.ensure_loaded?(Codepagex), do: :ok, else: {:error, "Codepagex is not available. Cannot fallback."}

lib/mimemail_flat.ex

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,53 +82,53 @@ defmodule MimeMail.Flat do
8282

8383
defp mail_htmlcontent(nil,_), do: nil
8484
defp mail_htmlcontent(body,[]), do:
85-
%MimeMail{headers: ['content-type': {"text/html",%{}}], body: body}
85+
%MimeMail{headers: [{:"content-type", {"text/html",%{}}}], body: body}
8686
defp mail_htmlcontent(body,included), do:
8787
%MimeMail{
88-
headers: ['content-type': {"multipart/related",%{}}],
88+
headers: [{:"content-type", {"multipart/related",%{}}}],
8989
body: [mail_htmlcontent(body,[]) | for {id,contenttype,binary}<-included do
9090
%MimeMail{
91-
headers: ['content-type': {contenttype,%{name: id}},
92-
'content-disposition': {"inline",%{filename: id}},
93-
'content-id': "<#{id}>"],
91+
headers: [{:"content-type", {contenttype,%{name: id}}},
92+
{:"content-disposition", {"inline",%{filename: id}}},
93+
{:"content-id", "<#{id}>"}],
9494
body: binary
9595
}
9696
end]
9797
}
9898

9999
defp mail_plaincontent(nil), do: nil
100100
defp mail_plaincontent(body), do:
101-
%MimeMail{headers: ['content-type': {"text/plain",%{}}], body: body}
101+
%MimeMail{headers: [{:"content-type", {"text/plain",%{}}}], body: body}
102102

103103
defp mail_icalcontent(nil), do: nil
104104
defp mail_icalcontent(body) when is_binary(body), do: mail_icalcontent({:request,body})
105105
defp mail_icalcontent({method,body}), do:
106-
%MimeMail{headers: ['content-type': {"text/calendar",%{method: String.upcase("#{method}")}}], body: body}
106+
%MimeMail{headers: [{:"content-type", {"text/calendar",%{method: String.upcase("#{method}")}}}], body: body}
107107

108108
defp mail_content([]), do: mail_plaincontent(" ")
109109
defp mail_content([singlecontent]), do: singlecontent
110110
defp mail_content([_|_]=contents), do:
111111
%MimeMail{
112-
headers: ['content-type': {"multipart/alternative",%{}}],
112+
headers: [{:"content-type", {"multipart/alternative",%{}}}],
113113
body: contents
114114
}
115115

116116
defp mail_final(content,[],[]), do: content
117117
defp mail_final(content,attached,attached_in), do:
118118
%MimeMail{
119-
headers: ['content-type': {"multipart/mixed",%{}}],
119+
headers: [{:"content-type", {"multipart/mixed",%{}}}],
120120
body: [content |
121121
for {name,contenttype,binary}<-attached do
122122
%MimeMail{
123-
headers: ['content-type': {contenttype,%{name: name}},
124-
'content-disposition': {"attachment",%{filename: name}}],
123+
headers: [{:"content-type", {contenttype,%{name: name}}},
124+
{:"content-disposition", {"attachment",%{filename: name}}}],
125125
body: binary
126126
}
127127
end ++
128128
for {name,contenttype,binary}<-attached_in do
129129
%MimeMail{
130-
headers: ['content-type': {contenttype,%{name: name}},
131-
'content-disposition': {"inline",%{filename: name}}],
130+
headers: [{:"content-type", {contenttype,%{name: name}}},
131+
{:"content-disposition", {"inline",%{filename: name}}}],
132132
body: binary
133133
}
134134
end

lib/spf.ex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ defmodule SPF do
3333
# check_host returns : none, :neutral,:pass,{:fail,msg},:softfail,:temperror,:permerror
3434
defp check_host(params) do
3535
if lookup_limit_exceeded() do :permerror else
36-
case :inet_res.lookup('#{params.domain}', :in, :txt, edns: 0) do
36+
case :inet_res.lookup(~c"#{params.domain}", :in, :txt, edns: 0) do
3737
[] -> :temperror
3838
recs ->
3939
rules=recs|>Enum.map(&Enum.join/1)|>Enum.filter(&match?("v=sp"<>_,&1))
@@ -52,7 +52,7 @@ defmodule SPF do
5252
{modifiers,mechanisms} = Enum.split_with(terms,&Regex.match?(~r/^[^:\/]+=/,&1))
5353
modifiers = Enum.map modifiers, fn modifier->
5454
[name,value]=String.split(modifier,"=")
55-
{:"#{name}",target_name(value,params) || ""}
55+
{:"#{name}",target_name(value,params)}
5656
end
5757
matches = Enum.map mechanisms, fn term->
5858
fn->
@@ -78,7 +78,7 @@ defmodule SPF do
7878
{:fail,expdomain}->
7979
try do
8080
false = lookup_limit_exceeded()
81-
[rec] = :inet_res.lookup('#{expdomain}', :in, :txt, edns: 0)
81+
[rec] = :inet_res.lookup(~c"#{expdomain}", :in, :txt, edns: 0)
8282
{:fail,rec|>IO.chardata_to_string|>target_name(params)}
8383
catch _, _ -> {:fail,defaultfail}
8484
end
@@ -113,7 +113,7 @@ defmodule SPF do
113113
family = if tuple_size(params.client_ip) == 4, do: :inet, else: :inet6
114114
{domain,prefix}=extract_prefix(target_name(domain_spec,params),family)
115115
false = lookup_limit_exceeded()
116-
case :inet_res.gethostbyname('#{domain}',family) do
116+
case :inet_res.gethostbyname(~c"#{domain}",family) do
117117
{:ok,{:hostent,_,_,_,_,ip_list}}->
118118
if Enum.any?(ip_list,&ip_in_network(params.client_ip,&1,prefix)), do: :match, else: :notmatch
119119
_->:notmatch
@@ -124,7 +124,7 @@ defmodule SPF do
124124
family = if tuple_size(params.client_ip) == 4, do: :inet, else: :inet6
125125
{domain,prefix}=extract_prefix(target_name(domain_spec,params),family)
126126
false = lookup_limit_exceeded()
127-
case :inet_res.lookup('#{domain}', :in, :mx, edns: 0) do
127+
case :inet_res.lookup(~c"#{domain}", :in, :mx, edns: 0) do
128128
[]->:notmatch
129129
res->
130130
Enum.find_value(res,fn {_prio,name}->
@@ -158,7 +158,7 @@ defmodule SPF do
158158
family = if tuple_size(params.client_ip) == 4, do: :inet, else: :inet6
159159
if (family==:inet and v !== ?4) or (family==:inet6 and v !== ?6) do :notmatch else
160160
{addr_spec,prefix}=extract_prefix(target_name(addr_spec,params),family)
161-
case :inet.parse_address('#{addr_spec}') do
161+
case :inet.parse_address(~c"#{addr_spec}") do
162162
{:ok,addr} when (tuple_size(addr)==4 and family==:inet) or
163163
(tuple_size(addr)==8 and family==:inet6)->
164164
if ip_in_network(params.client_ip,addr,prefix), do: :match, else: :notmatch
@@ -167,7 +167,7 @@ defmodule SPF do
167167
end
168168
def term_match("exists:"<>domain_spec,params) do
169169
false = lookup_limit_exceeded()
170-
case :inet_res.gethostbyname('#{target_name(domain_spec,params)}',:inet) do
170+
case :inet_res.gethostbyname(~c"#{target_name(domain_spec,params)}",:inet) do
171171
{:ok,{:hostent,_,_,_,_,ip_list}} when ip_list != [] -> :match
172172
_->:notmatch
173173
end

mix.exs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ defmodule Mix.Tasks.Compile.Iconv do
2222
lib_file = "priv/Elixir.Iconv_nif.#{lib_ext}"
2323
if not File.exists?(lib_file) do
2424
[i_erts]=Path.wildcard("#{:code.root_dir}/erts*/include")
25-
i_ei=:code.lib_dir(:erl_interface,:include)
26-
l_ei=:code.lib_dir(:erl_interface,:lib)
25+
i_ei= Path.join(:code.lib_dir(:erl_interface), "include")
26+
l_ei=Path.join(:code.lib_dir(:erl_interface), "lib")
2727
args = "-L\"#{l_ei}\" -lei -I\"#{i_ei}\" -I\"#{i_erts}\" -Wall -shared -fPIC"
2828
args = args <> if {:unix, :darwin}==:os.type, do: " -undefined dynamic_lookup -dynamiclib", else: ""
2929
args = args <> if {:win32, :nt}==:os.type, do: " -liconv", else: ""
30-
Mix.shell.info to_string :os.cmd('gcc #{args} -v -o #{lib_file} c_src/iconv_nif.c')
30+
Mix.shell.info to_string :os.cmd(~c"gcc #{args} -v -o #{lib_file} c_src/iconv_nif.c")
3131
end
3232
:ok
3333
end
@@ -38,7 +38,7 @@ defmodule Mailibex.Mixfile do
3838

3939
def app, do: :mailibex
4040

41-
def version, do: "0.2.1"
41+
def version, do: "0.2.2"
4242

4343
def source_url, do: "https://github.com/kbrw/#{app()}"
4444

test/dkim_test.exs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ defmodule DKIMTest do
22
use ExUnit.Case
33

44
setup_all do
5-
:code.unstick_dir(:code.lib_dir(:kernel)++'/ebin')
5+
:code.unstick_dir(:code.lib_dir(:kernel)++~c"/ebin")
66
previous_compiler_options = Code.compiler_options(ignore_module_conflict: true)
77
defmodule :inet_res do #mock external dns calls to hard define DKIM pub key when mock mails were constructed
88
def lookup(dns,type,class,_opts), do: lookup(dns,type,class)
9-
def lookup('20120113._domainkey.gmail.com',:in,:txt) do
10-
[['k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1Kd87/UeJjenpabgbFwh+eBCsSTrqmwIYYvywlbhbqoo2DymndFkbjOVIPIldNs/m40KF+yzMn1skyoxcTUGCQs8g3FgD2Ap3ZB5DekAo5wMmk4wimDO+U8QzI3SD0', '7y2+07wlNWwIt8svnxgdxGkVbbhzY8i+RQ9DpSVpPbF7ykQxtKXkv/ahW3KjViiAH+ghvvIhkx4xYSIc9oSwVmAl5OctMEeWUwg8Istjqz8BZeTWbf41fbNhte7Y+YqZOwq1Sd0DbvYAD9NOZK9vlfuac0598HY+vtSBczUiKERHv1yRbcaQtZFh5wtiRrN04BLUTD21MycBX5jYchHjPY/wIDAQAB']]
9+
def lookup(~c"20120113._domainkey.gmail.com",:in,:txt) do
10+
[[~c"k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1Kd87/UeJjenpabgbFwh+eBCsSTrqmwIYYvywlbhbqoo2DymndFkbjOVIPIldNs/m40KF+yzMn1skyoxcTUGCQs8g3FgD2Ap3ZB5DekAo5wMmk4wimDO+U8QzI3SD0", ~c"7y2+07wlNWwIt8svnxgdxGkVbbhzY8i+RQ9DpSVpPbF7ykQxtKXkv/ahW3KjViiAH+ghvvIhkx4xYSIc9oSwVmAl5OctMEeWUwg8Istjqz8BZeTWbf41fbNhte7Y+YqZOwq1Sd0DbvYAD9NOZK9vlfuac0598HY+vtSBczUiKERHv1yRbcaQtZFh5wtiRrN04BLUTD21MycBX5jYchHjPY/wIDAQAB"]]
1111
end
12-
def lookup('cobrason._domainkey.order.brendy.fr',:in,:txt) do
13-
[['k=rsa; t=y; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAofRImu739BK3m4Qj6uxZr/IBb2Jk5xuxY17pBgRp1ANAPFqJBg1mgUiwooT5n6/EjSA3dvt8MarlGNl+fOOOY02IWttkXW0fXWxW324iNaNE1aSyhHaP7dTmcSE3BnVjOVUGbZ5voLxjULq5+Ml1sy5Xt17cW38I0gja4ZtC0HQ9aUv4+eWZwxv4WIWpPUVH', 'qEFEptOHc1v1YbKO8lo9JFlO1wVvnQjEpWbg5ORGxaBnr92I0bZ2Hm5gU4WHOUiPKKk7J94wpO1KV++SGLaCeHDV8cW9e3RgGJs2IQzpjMDTyGEyHTo5WrgN3d9AOljyb2GOCnFEZ3lqI/+4XXbyHQIDAQAB']]
12+
def lookup(~c"cobrason._domainkey.order.brendy.fr",:in,:txt) do
13+
[[~c"k=rsa; t=y; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAofRImu739BK3m4Qj6uxZr/IBb2Jk5xuxY17pBgRp1ANAPFqJBg1mgUiwooT5n6/EjSA3dvt8MarlGNl+fOOOY02IWttkXW0fXWxW324iNaNE1aSyhHaP7dTmcSE3BnVjOVUGbZ5voLxjULq5+Ml1sy5Xt17cW38I0gja4ZtC0HQ9aUv4+eWZwxv4WIWpPUVH", ~c"qEFEptOHc1v1YbKO8lo9JFlO1wVvnQjEpWbg5ORGxaBnr92I0bZ2Hm5gU4WHOUiPKKk7J94wpO1KV++SGLaCeHDV8cW9e3RgGJs2IQzpjMDTyGEyHTo5WrgN3d9AOljyb2GOCnFEZ3lqI/+4XXbyHQIDAQAB"]]
1414
end
15-
def lookup('amazon201209._domainkey.amazon.fr',:in,:txt) do
16-
[['p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAjRD+MR0FAGIKMgpN6eK/z7Z+ojWuvb3a79qsLS3IU/hdifXxhoi9+ttd4eUBZKfwtSGVg8uOxGFJpPnp4MvZUgb8L6ZCkB/Big6l9JGPNHXCUo4e3RIQJzgWOuqPpO8pS+8HOJiH+fjxGwTZipiK353MlTudq9b6z8Gn8HCXkQIDAQAB;']]
15+
def lookup(~c"amazon201209._domainkey.amazon.fr",:in,:txt) do
16+
[[~c"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAjRD+MR0FAGIKMgpN6eK/z7Z+ojWuvb3a79qsLS3IU/hdifXxhoi9+ttd4eUBZKfwtSGVg8uOxGFJpPnp4MvZUgb8L6ZCkB/Big6l9JGPNHXCUo4e3RIQJzgWOuqPpO8pS+8HOJiH+fjxGwTZipiK353MlTudq9b6z8Gn8HCXkQIDAQAB;"]]
1717
end
1818
def lookup(_,_,_), do: []
1919
end

test/mime_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defmodule MimeMailTest do
1414
Enum.each String.split(res,"\r\n"), fn line->
1515
assert !Regex.match? ~r/\s+$/, line
1616
assert String.length(line) < 77
17-
assert [] = Enum.filter('#{line}',&(&1 < 32 or &1 > 127))
17+
assert [] = Enum.filter(~c"#{line}",&(&1 < 32 or &1 > 127))
1818
end
1919
end
2020
test "round trip quoted-printable" do

0 commit comments

Comments
 (0)