From e01706d1bba1c56dac8b296606eba8d61a160d99 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 25 Jul 2020 02:03:36 +0200 Subject: [PATCH] Accept and Into for FormattedBody::html --- ruma-events/src/room/message.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruma-events/src/room/message.rs b/ruma-events/src/room/message.rs index f573f51e..ef9ce944 100644 --- a/ruma-events/src/room/message.rs +++ b/ruma-events/src/room/message.rs @@ -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) -> Self { + Self { format: MessageFormat::Html, body: body.into() } } }