Fix a few clippy issues.

This commit is contained in:
Anthony Dodd 2021-05-18 20:30:40 -05:00
parent fcd88335a2
commit cdbaba3a02
No known key found for this signature in database
GPG Key ID: 6E0613E0F653DBC0
2 changed files with 2 additions and 5 deletions

View File

@ -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.

View File

@ -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)
}
}