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