From 6d843e9ccdb3ecae748f7082fbc39422620867f2 Mon Sep 17 00:00:00 2001 From: Elinvynia <59487684+Elinvynia@users.noreply.github.com> Date: Mon, 1 Jun 2020 13:03:58 +0200 Subject: [PATCH] update warp::reply::html() to return Html struct instead of impl Reply (#595) --- src/reply.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/reply.rs b/src/reply.rs index 657e6e822..349b70084 100644 --- a/src/reply.rs +++ b/src/reply.rs @@ -165,7 +165,7 @@ impl StdError for ReplyJsonError {} /// warp::reply::html(body) /// }); /// ``` -pub fn html(body: T) -> impl Reply +pub fn html(body: T) -> Html where Body: From, T: Send, @@ -173,8 +173,9 @@ where Html { body } } +/// An HTML reply. #[allow(missing_debug_implementations)] -struct Html { +pub struct Html { body: T, }