From 4b2c4cdf5de3e7bd1df954dccc320806b18fd1fb Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 12 Jun 2020 11:28:09 -0400 Subject: clean up --- tests/common/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/common') diff --git a/tests/common/mod.rs b/tests/common/mod.rs index ba302f9..70c8d8e 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -542,15 +542,16 @@ impl PaintingSim { let payloads = pss.iter().map(|e| e.to_bytes()).collect::>(); // write ahead - let (rids, ok) = wal.grow(payloads); + let rids = wal.grow(payloads); assert_eq!(pss.len(), rids.len()); + let rids = rids.into_iter().map(|r| futures::executor::block_on(r)).collect::>(); // keep track of the operations + // grow could fail for (ps, rid) in pss.iter().zip(rids.iter()) { ops.push(ps.clone()); - ringid_map.insert(*rid, ops.len() - 1); + ringid_map.insert((*rid)?, ops.len() - 1); } - // grow could fail - futures::executor::block_on(ok)?; + let rids = rids.into_iter().map(|r| r.unwrap()); // finish appending to WAL /* for rid in rids.iter() { -- cgit v1.2.3-70-g09d2