Skip to content

Commit

Permalink
update warp::reply::html() to return Html struct instead of impl Reply (
Browse files Browse the repository at this point in the history
  • Loading branch information
Elinvynia authored and jxs committed Jun 27, 2021
1 parent fb8a5a6 commit 6d843e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/reply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,17 @@ impl StdError for ReplyJsonError {}
/// warp::reply::html(body)
/// });
/// ```
pub fn html<T>(body: T) -> impl Reply
pub fn html<T>(body: T) -> Html<T>
where
Body: From<T>,
T: Send,
{
Html { body }
}

/// An HTML reply.
#[allow(missing_debug_implementations)]
struct Html<T> {
pub struct Html<T> {
body: T,
}

Expand Down

0 comments on commit 6d843e9

Please sign in to comment.