From 0ab21e780e8b944fb2e231c45b3777add27f368d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 6 Jun 2022 14:08:19 +0200 Subject: Small syntax changes --- src/garage/repair.rs | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'src/garage/repair.rs') diff --git a/src/garage/repair.rs b/src/garage/repair.rs index 75828f24..17e14b8b 100644 --- a/src/garage/repair.rs +++ b/src/garage/repair.rs @@ -67,13 +67,12 @@ impl Repair { let mut i = 0; while !*must_exit.borrow() { - let item_bytes = { - let (k, v) = match self.garage.version_table.data.store.get_gt(pos)? { - Some(pair) => pair, - None => break, - }; - pos = k; - v + let item_bytes = match self.garage.version_table.data.store.get_gt(pos)? { + Some((k, v)) => { + pos = k; + v + } + None => break, }; i += 1; @@ -119,13 +118,12 @@ impl Repair { let mut i = 0; while !*must_exit.borrow() { - let item_bytes = { - let (k, v) = match self.garage.block_ref_table.data.store.get_gt(pos)? { - Some(pair) => pair, - None => break, - }; - pos = k; - v + let item_bytes = match self.garage.block_ref_table.data.store.get_gt(pos)? { + Some((k, v)) => { + pos = k; + v + } + None => break, }; i += 1; -- cgit v1.2.3