aboutsummaryrefslogtreecommitdiff
path: root/src/table/sync.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-16 15:58:40 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-16 15:58:40 +0100
commitf4346cc5f45839ace93d2d11ce6beea632fd8f2c (patch)
tree61d33a0c30faa972a81519c09dd94b34282658e5 /src/table/sync.rs
parent2a41b8238496dfeac5ee0f273445299cbd112ff6 (diff)
downloadgarage-f4346cc5f45839ace93d2d11ce6beea632fd8f2c.tar.gz
garage-f4346cc5f45839ace93d2d11ce6beea632fd8f2c.zip
Update dependencies
Diffstat (limited to 'src/table/sync.rs')
-rw-r--r--src/table/sync.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/table/sync.rs b/src/table/sync.rs
index f5c2ef33..3130abe8 100644
--- a/src/table/sync.rs
+++ b/src/table/sync.rs
@@ -244,12 +244,8 @@ where
)));
}
} else {
- self.offload_partition(
- &partition.begin,
- &partition.end,
- must_exit,
- )
- .await?;
+ self.offload_partition(&partition.begin, &partition.end, must_exit)
+ .await?;
}
Ok(())
@@ -399,9 +395,7 @@ where
);
return Ok(());
}
- SyncRPC::RootCkDifferent(true) => {
- VecDeque::from(vec![root_ck_key])
- }
+ SyncRPC::RootCkDifferent(true) => VecDeque::from(vec![root_ck_key]),
x => {
return Err(Error::Message(format!(
"Invalid respone to RootCkHash RPC: {}",
@@ -550,7 +544,7 @@ impl SyncTodo {
let begin = partitions[i].1;
let end = if i + 1 < partitions.len() {
- partitions[i+1].1
+ partitions[i + 1].1
} else {
[0xFFu8; 32].into()
};
@@ -579,7 +573,7 @@ impl SyncTodo {
return None;
}
- let i = rand::thread_rng().gen_range::<usize, _, _>(0, self.todo.len());
+ let i = rand::thread_rng().gen_range(0..self.todo.len());
if i == self.todo.len() - 1 {
self.todo.pop()
} else {