From 592dee368d51b515f62780723954bdaa64ba09c8 Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Thu, 16 May 2024 16:51:58 -0700 Subject: [PATCH] replace comment on services with a doc comment The previous comment is pretty self-evident and also misunderstands async closures. --- src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4bb9db10..bd7b1aae 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,9 +61,7 @@ static GLOBAL: Jemalloc = Jemalloc; pub(crate) static SERVICES: RwLock> = RwLock::new(None); -// Not async due to services() being used in many closures, and async closures are not stable as of writing -// This is the case for every other occurence of sync Mutex/RwLock, except for database related ones, where -// the previous maintainer has asked to not modify those +/// Convenient access to the global [`Services`] instance pub(crate) fn services() -> &'static Services { SERVICES .read()