mirror of https://github.com/railgun-rs/actix-raft
Fix a few clippy issues.
This commit is contained in:
parent
fcd88335a2
commit
cdbaba3a02
|
@ -223,10 +223,7 @@ impl<D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>> Re
|
|||
return;
|
||||
}
|
||||
};
|
||||
let last_index_and_term = match self.outbound_buffer.last() {
|
||||
Some(last) => Some((last.as_ref().index, last.as_ref().term)),
|
||||
None => None,
|
||||
};
|
||||
let last_index_and_term = self.outbound_buffer.last().map(|last| (last.as_ref().index, last.as_ref().term));
|
||||
self.outbound_buffer.clear(); // Once we've successfully sent a payload of entries, don't send them again.
|
||||
|
||||
// Handle success conditions.
|
||||
|
|
|
@ -154,7 +154,7 @@ impl RaftRouter {
|
|||
};
|
||||
if let Err(err) = self.send_client_request(target, req).await {
|
||||
tracing::error!({error=%err}, "error from client request");
|
||||
panic!(err)
|
||||
panic!("{:?}", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue