chore: move when clause into pattern
This commit is contained in:
@@ -43,11 +43,11 @@ defmodule Swoosh.Adapters.Mailinator do
|
||||
alias Swoosh.Email
|
||||
alias Swoosh.Mailer
|
||||
|
||||
def deliver(%Email{html_body: html, text_body: text} = email, _) when is_nil(html) do
|
||||
def deliver(%Email{html_body: nil, text_body: _} = email, _) do
|
||||
email |> delegate
|
||||
end
|
||||
|
||||
def deliver(%Email{html_body: html, text_body: text} = email, _) when is_nil(text) do
|
||||
def deliver(%Email{html_body: _, text_body: nil} = email, _) do
|
||||
email |> delegate
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user