From 8ee6ce0307933d29755bfe786dc2d411b2aef9ba Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Thu, 16 Feb 2017 00:51:55 -0800 Subject: [PATCH] Update README --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0604e41..28dc3a3 100644 --- a/README.md +++ b/README.md @@ -117,10 +117,10 @@ service! { struct HelloServer; impl FutureService for HelloServer { - type HelloFut = futures::Finished; + type HelloFut = Result; fn hello(&self, name: String) -> Self::HelloFut { - futures::finished(format!("Hello, {}!", name)) + Ok(format!("Hello, {}!", name)) } } @@ -187,10 +187,10 @@ service! { struct HelloServer; impl FutureService for HelloServer { - type HelloFut = futures::Finished; + type HelloFut = Result; fn hello(&mut self, name: String) -> Self::HelloFut { - futures::finished(format!("Hello, {}!", name)) + Ok(format!("Hello, {}!", name)) } } @@ -264,10 +264,10 @@ and the following future-based trait: ```rust impl FutureService for HelloServer { - type HelloFut = futures::Finished; + type HelloFut = Result; fn hello(&mut self, name: String) -> Self::HelloFut { - futures::finished(format!("Hello, {}!", name)) + Ok(format!("Hello, {}!", name)) } } ```