Skip to content

Commit

Permalink
Clarify Any Protocol implementation derivation (#12978)
Browse files Browse the repository at this point in the history
A small edit on the "Deriving" section of the "Protocols" chapter in "Getting Started".

Changing "we should be fine with the implementation of Any" to
"should we be fine with the implementation of any" hopefully
better communicates that we can use the Any implementation of
the protocol if we wish to but not that we have to.
  • Loading branch information
Stevo-S authored Oct 2, 2023
1 parent 78c9666 commit e4431b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/elixir/pages/getting-started/protocols.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ end

The implementation above is arguably not a reasonable one. For example, it makes no sense to say that the size of a `PID` or an `Integer` is `0`.

However, we should be fine with the implementation for `Any`, in order to use such implementation we would need to tell our struct to explicitly derive the `Size` protocol:
However, should we be fine with the implementation for `Any`, in order to use such implementation we would need to tell our struct to explicitly derive the `Size` protocol:

```elixir
defmodule OtherUser do
Expand Down

0 comments on commit e4431b8

Please sign in to comment.