More clippy

This commit is contained in:
Michael Vines
2019-10-02 18:33:01 -07:00
parent 9fe8c98047
commit f9f5bc2eb5
21 changed files with 97 additions and 90 deletions

View File

@@ -809,7 +809,7 @@ impl ClusterInfo {
// by a valid tvu port location
let valid: Vec<_> = self.repair_peers();
if valid.is_empty() {
Err(ClusterInfoError::NoPeers)?;
return Err(ClusterInfoError::NoPeers.into());
}
let n = thread_rng().gen::<usize>() % valid.len();
let addr = valid[n].gossip; // send the request to the peer's gossip port