Skip to content

Commit 45485fb

Browse files
committed
Remove file open in File.iterator and File.biniterator
1 parent 854942d commit 45485fb

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

lib/elixir/lib/file.ex

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -957,12 +957,6 @@ defmodule File do
957957
end
958958
959959
"""
960-
def iterator(device)
961-
962-
def iterator(file) when is_binary(file) or is_list(file) do
963-
open(file, []) |> iterator
964-
end
965-
966960
def iterator(device) do
967961
fn(fun, acc) ->
968962
do_iterator(device, fun, acc)
@@ -991,12 +985,6 @@ defmodule File do
991985
be passed into `Enum` to iterate line by line as a
992986
binary. Check `iterator/1` for more information.
993987
"""
994-
def biniterator(device)
995-
996-
def biniterator(file) when is_binary(file) or is_list(file) do
997-
open(file, []) |> biniterator
998-
end
999-
1000988
def biniterator(device) do
1001989
fn(fun, acc) ->
1002990
do_biniterator(device, fun, acc)

0 commit comments

Comments
 (0)