diff --git a/src/handshake/server.rs b/src/handshake/server.rs index bc072ce9..f0c82bbe 100644 --- a/src/handshake/server.rs +++ b/src/handshake/server.rs @@ -86,10 +86,10 @@ pub fn create_response(request: &Request) -> Result { } /// Create a response for the request with a custom body. -pub fn create_response_with_body( - request: &HttpRequest, - generate_body: impl FnOnce() -> T, -) -> Result> { +pub fn create_response_with_body( + request: &HttpRequest, + generate_body: impl FnOnce() -> T2, +) -> Result> { Ok(create_parts(request)?.body(generate_body())?) }