From ee62172f54e6ecd1c94dd162ff96a534e1f1a6e0 Mon Sep 17 00:00:00 2001 From: null8626 Date: Tue, 2 Jan 2024 20:49:48 +0700 Subject: [PATCH] style: put this out of the scope --- src/autoposter.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/autoposter.rs b/src/autoposter.rs index 4681a7b..9e73cc4 100644 --- a/src/autoposter.rs +++ b/src/autoposter.rs @@ -114,8 +114,9 @@ impl Autoposter { Self { thread: spawn(async move { loop { + data.sem.acquire().await.unwrap().forget(); + { - data.sem.acquire().await.unwrap().forget(); let lock = data.stats.lock().await; let _ = client.post_stats(&lock).await; };