-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
defmodule StringCharsValue do | ||
Check warning on line 1 in test/support/protocols.ex GitHub Actions / test (24, 1.14)
Check warning on line 1 in test/support/protocols.ex GitHub Actions / test (24, 1.15)
Check warning on line 1 in test/support/protocols.ex GitHub Actions / test (25, 1.14)
Check warning on line 1 in test/support/protocols.ex GitHub Actions / test (26, 1.14)
Check warning on line 1 in test/support/protocols.ex GitHub Actions / test (25, 1.15)
Check warning on line 1 in test/support/protocols.ex GitHub Actions / test (26, 1.15)
Check warning on line 1 in test/support/protocols.ex GitHub Actions / test (23, 1.14)
|
||
defstruct [:message] | ||
|
||
defimpl String.Chars do | ||
def to_string(%{message: message}) do | ||
Check warning on line 5 in test/support/protocols.ex GitHub Actions / test (24, 1.14)
Check warning on line 5 in test/support/protocols.ex GitHub Actions / test (24, 1.15)
Check warning on line 5 in test/support/protocols.ex GitHub Actions / test (25, 1.14)
Check warning on line 5 in test/support/protocols.ex GitHub Actions / test (26, 1.14)
Check warning on line 5 in test/support/protocols.ex GitHub Actions / test (25, 1.15)
Check warning on line 5 in test/support/protocols.ex GitHub Actions / test (26, 1.15)
Check warning on line 5 in test/support/protocols.ex GitHub Actions / test (23, 1.14)
|
||
"StringCharsValue says: " <> message | ||
end | ||
end | ||
end | ||
|
||
defmodule JasonEncoderValue do | ||
Check warning on line 11 in test/support/protocols.ex GitHub Actions / test (24, 1.14)
Check warning on line 11 in test/support/protocols.ex GitHub Actions / test (24, 1.15)
Check warning on line 11 in test/support/protocols.ex GitHub Actions / test (25, 1.14)
Check warning on line 11 in test/support/protocols.ex GitHub Actions / test (26, 1.14)
Check warning on line 11 in test/support/protocols.ex GitHub Actions / test (25, 1.15)
Check warning on line 11 in test/support/protocols.ex GitHub Actions / test (26, 1.15)
Check warning on line 11 in test/support/protocols.ex GitHub Actions / test (23, 1.14)
|
||
@derive {Jason.Encoder, only: [:message]} | ||
defstruct [:message, :secret] | ||
end | ||
|
||
defmodule InspectValue do | ||
Check warning on line 16 in test/support/protocols.ex GitHub Actions / test (24, 1.14)
Check warning on line 16 in test/support/protocols.ex GitHub Actions / test (24, 1.15)
Check warning on line 16 in test/support/protocols.ex GitHub Actions / test (25, 1.14)
Check warning on line 16 in test/support/protocols.ex GitHub Actions / test (26, 1.14)
Check warning on line 16 in test/support/protocols.ex GitHub Actions / test (25, 1.15)
Check warning on line 16 in test/support/protocols.ex GitHub Actions / test (26, 1.15)
Check warning on line 16 in test/support/protocols.ex GitHub Actions / test (23, 1.14)
|
||
@derive {Inspect, only: [:message]} | ||
defstruct [:message, :secret] | ||
end |