diff --git a/src/resource.rs b/src/resource.rs
index 05806843b..80b06bf43 100644
--- a/src/resource.rs
+++ b/src/resource.rs
@@ -100,10 +100,8 @@ impl HttpMessage where A: Actor> + Route
HttpMessage(HttpMessageItem::Actor(act))
}
- /// Create response with empty body
- pub fn reply(req: HttpRequest, msg: I) -> Self
- where I: IntoHttpResponse
- {
+ /// Send response
+ pub fn reply(req: HttpRequest, msg: I) -> Self {
HttpMessage(HttpMessageItem::Message(msg.into_response(req)))
}
diff --git a/src/route.rs b/src/route.rs
index c214de73a..c8c3b4b97 100644
--- a/src/route.rs
+++ b/src/route.rs
@@ -66,10 +66,8 @@ pub trait Route: Actor> {
HttpMessage::stream(act)
}
- /// Create response
- fn http_reply(req: HttpRequest, msg: I) -> HttpMessage
- where I: IntoHttpResponse
- {
+ /// Send response
+ fn http_reply(req: HttpRequest, msg: I) -> HttpMessage {
HttpMessage::reply(req, msg)
}
}