1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-17 13:46:36 +00:00

better naming

This commit is contained in:
Nikolay Kim 2017-10-07 00:31:40 -07:00
parent 127cc270da
commit 9b7f2395e5
2 changed files with 4 additions and 8 deletions

View file

@ -100,10 +100,8 @@ impl<A> HttpMessage<A> where A: Actor<Context=HttpContext<A>> + Route
HttpMessage(HttpMessageItem::Actor(act))
}
/// Create response with empty body
pub fn reply<I>(req: HttpRequest, msg: I) -> Self
where I: IntoHttpResponse
{
/// Send response
pub fn reply<I: IntoHttpResponse>(req: HttpRequest, msg: I) -> Self {
HttpMessage(HttpMessageItem::Message(msg.into_response(req)))
}

View file

@ -66,10 +66,8 @@ pub trait Route: Actor<Context=HttpContext<Self>> {
HttpMessage::stream(act)
}
/// Create response
fn http_reply<I>(req: HttpRequest, msg: I) -> HttpMessage<Self>
where I: IntoHttpResponse
{
/// Send response
fn http_reply<I: IntoHttpResponse>(req: HttpRequest, msg: I) -> HttpMessage<Self> {
HttpMessage::reply(req, msg)
}
}