Skip to content

Commit 9449df8

Browse files
authored
Improve coverage for Keyword.delete_first/2 (#14412)
1 parent f5e28b6 commit 9449df8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/elixir/lib/keyword.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,10 @@ defmodule Keyword do
742742
743743
iex> Keyword.delete_first([a: 1, b: 2, a: 3], :a)
744744
[b: 2, a: 3]
745+
746+
iex> Keyword.delete_first([a: 1, b: 2, b: 3], :b)
747+
[a: 1, b: 3]
748+
745749
iex> Keyword.delete_first([b: 2], :a)
746750
[b: 2]
747751
@@ -762,10 +766,6 @@ defmodule Keyword do
762766
[pair | delete_first_key(tail, key)]
763767
end
764768

765-
defp delete_first_key([], _key) do
766-
[]
767-
end
768-
769769
@doc """
770770
Puts the given `value` under the specified `key`.
771771

0 commit comments

Comments
 (0)