Accept and Into<String> for FormattedBody::html

This commit is contained in:
Jonas Platte 2020-07-25 02:03:36 +02:00
parent f56b530dc3
commit e01706d1bb
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -294,8 +294,8 @@ pub struct FormattedBody {
impl FormattedBody {
/// Creates a new HTML-formatted message body.
pub fn html(body: String) -> Self {
Self { format: MessageFormat::Html, body }
pub fn html(body: impl Into<String>) -> Self {
Self { format: MessageFormat::Html, body: body.into() }
}
}