Skip to content

Commit a7703a9

Browse files
committed
Use Keyword.get_lazy/3
1 parent 8a13ed4 commit a7703a9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/iex/lib/iex/config.ex

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,7 @@ defmodule IEx.Config do
9999
end
100100

101101
defp colors_enabled?(colors) do
102-
case Keyword.fetch(colors, :enabled) do
103-
{:ok, enabled} ->
104-
enabled
105-
106-
:error ->
107-
IO.ANSI.enabled?()
108-
end
102+
Keyword.get_lazy(colors, :enabled, &IO.ANSI.enabled?/0)
109103
end
110104

111105
def dot_iex() do

0 commit comments

Comments
 (0)