From 127cc270dabe453c16b9e9b1ca0b3626671946b1 Mon Sep 17 00:00:00 2001
From: Nikolay Kim <fafhrd91@gmail.com>
Date: Sat, 7 Oct 2017 00:22:09 -0700
Subject: [PATCH] better naming

---
 src/context.rs | 2 +-
 src/main.rs    | 6 +++---
 src/route.rs   | 4 ++--
 src/server.rs  | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

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<A> HttpContext<A> where A: Actor<Context=Self> + 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<PayloadItem> 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<Context=HttpContext<Self>> {
     }
 
     /// Create async response
-    fn stream(act: Self) -> HttpMessage<Self> {
+    fn http_stream(act: Self) -> HttpMessage<Self> {
         HttpMessage::stream(act)
     }
 
     /// Create response
-    fn reply<I>(req: HttpRequest, msg: I) -> HttpMessage<Self>
+    fn http_reply<I>(req: HttpRequest, msg: I) -> HttpMessage<Self>
         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()
     }
 }