Skip to content

Commit a4641f8

Browse files
committed
Check exclude_protocol_implementation for String.Chars defimpl
1 parent 4c241b3 commit a4641f8

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/money/protocol/string_chars.ex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
defimpl String.Chars, for: Money do
2-
def to_string(v) do
3-
Money.to_string!(v)
1+
if !Money.exclude_protocol_implementation(String.Chars) do
2+
defimpl String.Chars, for: Money do
3+
def to_string(v) do
4+
Money.to_string!(v)
5+
end
46
end
5-
end
7+
end

0 commit comments

Comments
 (0)