Skip to content

Commit

Permalink
No need to mention key enforcement on struct update (#13990)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrisi authored Nov 13, 2024
1 parent 8b87b4d commit 7c6efcf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/elixir/lib/kernel.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2449,8 +2449,6 @@ defmodule Kernel do
* when updating a struct, as in `struct!(%SomeStruct{}, key: :value)`,
it is equivalent to `%SomeStruct{struct | key: :value}` and therefore this
function will check if every given key-value belongs to the struct.
However, updating structs does not enforce keys, as keys are enforced
only when building;
"""
@spec struct!(module | struct, Enumerable.t()) :: struct
Expand Down

0 comments on commit 7c6efcf

Please sign in to comment.