diff --git a/src/service/service.rs b/src/service/service.rs index 95024bee44..c6db129bf4 100644 --- a/src/service/service.rs +++ b/src/service/service.rs @@ -28,13 +28,13 @@ pub trait Service { type Future: Future>; /// Process the request and return the response asynchronously. - /// call takes a &self instead of a mut &self because: + /// `call` takes `&self` instead of `mut &self` because: /// - It prepares the way for async fn, - /// since then the future only borrows &self, and thus a Service can concurrently handle + /// since then the future only borrows `&self`, and thus a Service can concurrently handle /// multiple outstanding requests at once. /// - It's clearer that Services can likely be cloned - /// - To share state across clones you generally need Arc> - /// that means you're not really using the &mut self and could do with a &self - /// To see the discussion on this see: + /// - To share state across clones, you generally need `Arc>` + /// That means you're not really using the `&mut self` and could do with a `&self`. + /// The discussion on this is here: fn call(&self, req: Request) -> Self::Future; }