Keystore 2.0: Add shelf to async tasks.
The Shelf allows async tasks to store state across invocations.
Test: N/A
Change-Id: Ic4cbf7973e0c812479da87431372ed210e9411cf
diff --git a/keystore2/src/gc.rs b/keystore2/src/gc.rs
index fbb1cf6..718fe77 100644
--- a/keystore2/src/gc.rs
+++ b/keystore2/src/gc.rs
@@ -82,7 +82,7 @@
}
}
if self.remaining_tries != 0 {
- ASYNC_TASK.queue_lo(move || {
+ ASYNC_TASK.queue_lo(move |_| {
self.process_all();
})
}
@@ -92,6 +92,6 @@
/// their deletion. We only process one key at a time and then schedule another
/// attempt by queueing it in the async_task (low priority) queue.
pub fn notify_gc() {
- ASYNC_TASK.queue_lo(|| Self { remaining_tries: Self::MAX_ERROR_RETRIES }.process_all())
+ ASYNC_TASK.queue_lo(|_| Self { remaining_tries: Self::MAX_ERROR_RETRIES }.process_all())
}
}