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)) } } ```