Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type spec & doc of Formatter.format_email_address/2 #585

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

nonrational
Copy link
Contributor

Formatter.format_email_address/2 can return an address or list of addresses. Both single address and list are accounted for in the address_list type.

Copy link
Collaborator

@germsvel germsvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're spot on that the Bamboo.Formatter for List will return a list of email addresses. Thanks for opening the PR! 🎉

@@ -65,7 +65,7 @@ defprotocol Bamboo.Formatter do

@type opts :: %{optional(:type) => :from | :to | :cc | :bcc}

@spec format_email_address(any, opts) :: Bamboo.Email.address()
@spec format_email_address(any, opts) :: Bamboo.Email.address_list()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@germsvel germsvel merged commit 4066794 into beam-community:master Feb 23, 2021
@nonrational nonrational deleted the formatter-spec branch February 23, 2021 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants