Skip to content

Commit

Permalink
v0.1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Jan 9, 2024
1 parent 1511dcd commit dcd3d5a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions binding/python/src/bindings/raft_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use raftify::{
raft::eraftpb::{ConfChangeV2, Message},
Channel, RaftServiceClient,
};
use tonic::Request;

use super::{
errors::WrongArgumentError,
Expand Down Expand Up @@ -52,7 +51,7 @@ impl PyRaftServiceClient {
Arguments::ChangeConfig { conf_change } => {
let result = self
.inner
.change_config(Request::new(conf_change.clone()))
.change_config(conf_change.clone())
.await
.unwrap()
.into_inner();
Expand All @@ -77,7 +76,7 @@ impl PyRaftServiceClient {
match &self.args {
Arguments::SendMessage { message } => {
self.inner
.send_message(Request::new(message.clone()))
.send_message(message.clone())
.await
.unwrap();

Expand All @@ -99,9 +98,9 @@ impl PyRaftServiceClient {
match &self.args {
Arguments::Propose { proposal } => {
self.inner
.propose(Request::new(raftify::raft_service::ProposeArgs {
.propose(raftify::raft_service::ProposeArgs {
msg: proposal.clone(),
}))
})
.await
.unwrap();

Expand All @@ -118,7 +117,7 @@ impl PyRaftServiceClient {
pub async fn get_peers(&mut self) -> PyResult<String> {
let result = self
.inner
.get_peers(Request::new(raftify::raft_service::Empty {}))
.get_peers(raftify::raft_service::Empty {})
.await
.unwrap()
.into_inner();
Expand Down

0 comments on commit dcd3d5a

Please sign in to comment.