Skip to content

Commit

Permalink
async-client: Allow sending requests via a &Client
Browse files Browse the repository at this point in the history
This allows concurrent usage of the client, e.g. by using an `Arc<Client>`.

Signed-off-by: Chen Yu <[email protected]>
  • Loading branch information
Kazurin-775 authored and Tim-Zhang committed Jun 19, 2023
1 parent 40288af commit 37f9c0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/asynchronous/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl Client {
Client { req_tx }
}

pub async fn request(&mut self, req: Request) -> Result<Response> {
pub async fn request(&self, req: Request) -> Result<Response> {
let mut buf = Vec::with_capacity(req.compute_size() as usize);
{
let mut s = CodedOutputStream::vec(&mut buf);
Expand Down

0 comments on commit 37f9c0e

Please sign in to comment.