replace comment on services with a doc comment

The previous comment is pretty self-evident and also misunderstands
async closures.
This commit is contained in:
Charles Hall 2024-05-16 16:51:58 -07:00
parent 94978b95a6
commit 592dee368d
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF

View file

@ -61,9 +61,7 @@ static GLOBAL: Jemalloc = Jemalloc;
pub(crate) static SERVICES: RwLock<Option<&'static Services>> = RwLock::new(None); pub(crate) static SERVICES: RwLock<Option<&'static Services>> = RwLock::new(None);
// Not async due to services() being used in many closures, and async closures are not stable as of writing /// Convenient access to the global [`Services`] instance
// 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
pub(crate) fn services() -> &'static Services { pub(crate) fn services() -> &'static Services {
SERVICES SERVICES
.read() .read()