mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-20 01:52:15 +00:00
fix some clippy lints
This commit is contained in:
+4
-4
@@ -123,15 +123,15 @@ impl<F: TableSchema, R: TableReplication> TableSyncer<F, R> {
|
||||
|
||||
let mut sync_futures = result_tracker
|
||||
.nodes
|
||||
.iter()
|
||||
.map(|(node, _)| *node)
|
||||
.keys()
|
||||
.copied()
|
||||
.map(|node| {
|
||||
let must_exit = must_exit.clone();
|
||||
async move {
|
||||
if node == my_id {
|
||||
(node, Ok(()))
|
||||
} else {
|
||||
(node, self.do_sync_with(&partition, node, must_exit).await)
|
||||
(node, self.do_sync_with(partition, node, must_exit).await)
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -145,7 +145,7 @@ impl<F: TableSchema, R: TableReplication> TableSyncer<F, R> {
|
||||
}
|
||||
|
||||
if result_tracker.too_many_failures() {
|
||||
return Err(result_tracker.quorum_error());
|
||||
Err(result_tracker.quorum_error())
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+1
-2
@@ -209,8 +209,7 @@ impl<F: TableSchema, R: TableReplication> Table<F, R> {
|
||||
// it takes part, to optimize the detection of a quorum.
|
||||
let mut write_sets = entries_vec
|
||||
.iter()
|
||||
.map(|(wss, _)| wss.as_ref().iter().map(|ws| ws.as_slice()))
|
||||
.flatten()
|
||||
.flat_map(|(wss, _)| wss.as_ref().iter().map(|ws| ws.as_slice()))
|
||||
.collect::<Vec<&[Uuid]>>();
|
||||
write_sets.sort();
|
||||
write_sets.dedup();
|
||||
|
||||
Reference in New Issue
Block a user