Skip to content

Commit 4ad1ca3

Browse files
committed
Fixed File.listdir! to return the list, without wrapping it in {:ok, _}
1 parent 27d9580 commit 4ad1ca3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/lib/file.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ defmodule File do
929929
"""
930930
def listdir!(dir) do
931931
case F.list_dir(dir) do
932-
{ :ok, file_list } -> { :ok, Enum.map file_list, :unicode.characters_to_binary(&1) }
932+
{ :ok, file_list } -> Enum.map file_list, :unicode.characters_to_binary(&1)
933933
{ :error, reason } ->
934934
raise File.Error, reason: reason, action: "list directory", path: :unicode.characters_to_binary(dir)
935935
end

0 commit comments

Comments
 (0)