From 4eb7f02985747e1ee4d138c6432e5192f4f95b11 Mon Sep 17 00:00:00 2001 From: Julien Cretin Date: Thu, 7 Oct 2021 21:44:06 +0200 Subject: [PATCH] Remove useless retry-loop This was needed in the past although we would never enter the loop. But call unwrap directly would fail. --- examples/store_latency.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/store_latency.rs b/examples/store_latency.rs index a113400..9b5ee7e 100644 --- a/examples/store_latency.rs +++ b/examples/store_latency.rs @@ -113,11 +113,7 @@ fn compute_latency( let ((), time) = measure(timer, || { for i in 0..count { let key = 1 + key_increment * i; - // For some reason the kernel sometimes fails. - while store.insert(key, &vec![0; 4 * word_length]).is_err() { - // We never enter this loop in practice, but we still need it for the kernel. - writeln!(console, "Retry insert.").unwrap(); - } + store.insert(key, &vec![0; 4 * word_length]).unwrap(); } }); writeln!(console, "Setup: {:.1}ms for {} entries.", time.ms(), count).unwrap();