From 430107e9b25a882a838d2b6e25bc6a892ebb9e13 Mon Sep 17 00:00:00 2001 From: Allan Date: Thu, 30 Nov 2023 11:45:39 -0500 Subject: [PATCH] docs(service): minor language fixes to `Service::call` (#3449) --- src/service/service.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; }