Skip to content

Commit 24a4929

Browse files
committed
Replace length check with a check against []
length() is not constant time
1 parent 02edfed commit 24a4929

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/iex/lib/iex/helpers.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ defmodule IEx.Helpers do
194194
h(module, function, arity)
195195
IO.puts ""
196196
end
197-
if length(result) > 0 do
197+
if result != [] do
198198
:ok
199199
else
200200
:not_found

0 commit comments

Comments
 (0)