From f4f719670500efba571f0236e282102a847cb9b3 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Sat, 23 Mar 2024 01:30:44 +0100 Subject: [PATCH] Save concurrently too because why not --- lib/storage/home.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/storage/home.rs b/lib/storage/home.rs index 55a7ab9..abdb7df 100644 --- a/lib/storage/home.rs +++ b/lib/storage/home.rs @@ -80,8 +80,10 @@ impl Home { Saves the contents of this `Home` to disk. */ pub async fn save(&self) -> StorageResult<()> { - self.trust_cache.save(&self.path).await?; - self.install_cache.save(&self.path).await?; + tokio::try_join!( + self.trust_cache.save(&self.path), + self.install_cache.save(&self.path) + )?; self.saved.store(true, Ordering::SeqCst); Ok(()) }