mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-07 05:13:12 +00:00
fix new cargo clippy lints
This commit is contained in:
@@ -473,12 +473,10 @@ where
|
||||
))));
|
||||
}
|
||||
}
|
||||
Poll::Ready(None) => {
|
||||
if !self.length.contains(&self.read) {
|
||||
return Poll::Ready(Some(Err(Error::bad_request(
|
||||
"File size does not match policy",
|
||||
))));
|
||||
}
|
||||
Poll::Ready(None) if !self.length.contains(&self.read) => {
|
||||
return Poll::Ready(Some(Err(Error::bad_request(
|
||||
"File size does not match policy",
|
||||
))));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
+1
-1
@@ -648,7 +648,7 @@ impl BlockStoreIterator {
|
||||
|
||||
let mut cum_cap = 0;
|
||||
let mut todo = vec![];
|
||||
for (dir, cap) in data_layout.data_dirs.iter().zip(dir_cap.into_iter()) {
|
||||
for (dir, cap) in data_layout.data_dirs.iter().zip(dir_cap) {
|
||||
let progress_min = (cum_cap * PROGRESS_FP) / sum_cap;
|
||||
let progress_max = ((cum_cap + cap as u64) * PROGRESS_FP) / sum_cap;
|
||||
cum_cap += cap as u64;
|
||||
|
||||
+2
-4
@@ -313,10 +313,8 @@ impl PeeringManager {
|
||||
to_ping.push(*id);
|
||||
}
|
||||
}
|
||||
PeerConnState::Waiting(_, t) => {
|
||||
if Instant::now() >= t {
|
||||
to_retry.push(*id);
|
||||
}
|
||||
PeerConnState::Waiting(_, t) if Instant::now() >= t => {
|
||||
to_retry.push(*id);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
@@ -241,11 +241,7 @@ impl RpcHelper {
|
||||
)
|
||||
.with_context(Context::current_with_span(span))
|
||||
.await;
|
||||
Ok(to
|
||||
.iter()
|
||||
.cloned()
|
||||
.zip(resps.into_iter())
|
||||
.collect::<Vec<_>>())
|
||||
Ok(to.iter().cloned().zip(resps).collect::<Vec<_>>())
|
||||
}
|
||||
|
||||
pub async fn broadcast<M, N, H, S>(
|
||||
|
||||
Reference in New Issue
Block a user