diff --git a/src/context.rs b/src/context.rs
index 88bd1b650..d7dc2b30d 100644
--- a/src/context.rs
+++ b/src/context.rs
@@ -75,7 +75,7 @@ impl HttpContext where A: Actor + Route {
act: None,
state: ActorState::Started,
items: Vec::new(),
- address: ActorAddressCell::new(),
+ address: ActorAddressCell::default(),
stream: VecDeque::new(),
app_state: state,
}
diff --git a/src/main.rs b/src/main.rs
index 471a67c7f..18ed55ea2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -25,9 +25,9 @@ impl Route for MyRoute {
{
if let Some(pl) = payload {
ctx.add_stream(pl);
- Self::stream(MyRoute{req: Some(req)})
+ Self::http_stream(MyRoute{req: Some(req)})
} else {
- Self::reply(req, httpcodes::HTTPOk)
+ Self::http_reply(req, httpcodes::HTTPOk)
}
}
}
@@ -49,7 +49,7 @@ impl Handler for MyRoute {
ctx.write_eof();
}
- Response::Empty()
+ Self::empty()
}
}
diff --git a/src/route.rs b/src/route.rs
index 4cf57e919..c214de73a 100644
--- a/src/route.rs
+++ b/src/route.rs
@@ -62,12 +62,12 @@ pub trait Route: Actor> {
}
/// Create async response
- fn stream(act: Self) -> HttpMessage {
+ fn http_stream(act: Self) -> HttpMessage {
HttpMessage::stream(act)
}
/// Create response
- fn reply(req: HttpRequest, msg: I) -> HttpMessage
+ fn http_reply(req: HttpRequest, msg: I) -> HttpMessage
where I: IntoHttpResponse
{
HttpMessage::reply(req, msg)
diff --git a/src/server.rs b/src/server.rs
index f0f38a536..ae190c4ec 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -58,7 +58,7 @@ impl Handler<(TcpStream, net::SocketAddr), io::Error> for HttpServer {
items: VecDeque::new(),
inactive: Vec::new(),
});
- Response::Empty()
+ Self::empty()
}
}