Skip to content

Commit c5a8fce

Browse files
committed
lib: fix Already borrowed
1 parent 39a40b2 commit c5a8fce

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/lib.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl ManagerClient {
109109
}
110110

111111
fn quorum(
112-
&mut self,
112+
&self,
113113
py: Python<'_>,
114114
rank: i64,
115115
step: i64,
@@ -129,7 +129,7 @@ impl ManagerClient {
129129
// keep alives to detect server health.
130130
request.set_timeout(timeout);
131131

132-
let response = self.runtime.block_on(self.client.quorum(request))?;
132+
let response = self.runtime.block_on(self.client.clone().quorum(request))?;
133133
let resp = response.into_inner();
134134
Ok((
135135
resp.quorum_id,
@@ -146,7 +146,7 @@ impl ManagerClient {
146146
}
147147

148148
fn checkpoint_address(
149-
&mut self,
149+
&self,
150150
py: Python<'_>,
151151
rank: i64,
152152
timeout: Duration,
@@ -160,14 +160,14 @@ impl ManagerClient {
160160

161161
let response = self
162162
.runtime
163-
.block_on(self.client.checkpoint_address(request))?;
163+
.block_on(self.client.clone().checkpoint_address(request))?;
164164
let resp = response.into_inner();
165165
Ok(resp.checkpoint_server_address)
166166
})
167167
}
168168

169169
fn should_commit(
170-
&mut self,
170+
&self,
171171
py: Python<'_>,
172172
rank: i64,
173173
step: i64,
@@ -185,7 +185,9 @@ impl ManagerClient {
185185
// endpoint timeout which we set on client creation.
186186
request.set_timeout(timeout);
187187

188-
let response = self.runtime.block_on(self.client.should_commit(request))?;
188+
let response = self
189+
.runtime
190+
.block_on(self.client.clone().should_commit(request))?;
189191
let resp = response.into_inner();
190192
Ok(resp.should_commit)
191193
})

0 commit comments

Comments
 (0)