aboutsummaryrefslogtreecommitdiff
path: root/src/client.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-10-14 14:54:48 +0200
committerAlex Auvolat <alex@adnab.me>2021-10-14 16:11:07 +0200
commit8a0bfa0ff6bc6b79c91c8e635dd00c2f687ec401 (patch)
tree15179701a037f4eeb39a61f68ea723f26ae899c5 /src/client.rs
parentfba49cf93dedae21cbe884db8c0124c0d3c88730 (diff)
downloadnetapp-8a0bfa0ff6bc6b79c91c8e635dd00c2f687ec401.tar.gz
netapp-8a0bfa0ff6bc6b79c91c8e635dd00c2f687ec401.zip
Change call() to take a ref to the message to be sent
Handlers also receive a ref
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client.rs b/src/client.rs
index ffa6893..ca1bcf9 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -112,7 +112,7 @@ impl ClientConn {
pub(crate) async fn call<T>(
self: Arc<Self>,
- rq: T,
+ rq: &T,
path: &str,
prio: RequestPriority,
) -> Result<<T as Message>::Response, Error>
@@ -127,7 +127,7 @@ impl ClientConn {
let mut bytes = vec![prio, path.as_bytes().len() as u8];
bytes.extend_from_slice(path.as_bytes());
- bytes.extend_from_slice(&rmp_to_vec_all_named(&rq)?[..]);
+ bytes.extend_from_slice(&rmp_to_vec_all_named(rq)?[..]);
let (resp_send, resp_recv) = oneshot::channel();
let old = self.inflight.lock().unwrap().insert(id, resp_send);