Skip to content

Commit

Permalink
comment about right associative -- operator
Browse files Browse the repository at this point in the history
  • Loading branch information
maltoe committed Dec 20, 2023
1 parent 508087e commit b23e33b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/bitcrowd_ecto/changeset.ex
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ defmodule BitcrowdEcto.Changeset do
end

defp cast_scalars(schema_struct, params, scalars, required) do
# Don't be confused, `--` is right-associative.
# https://hexdocs.pm/elixir/1.15.7/operators.html#operator-precedence-and-associativity
required = scalars -- scalars -- required

schema_struct
Expand Down

0 comments on commit b23e33b

Please sign in to comment.