From de01d25a5292795aefbb1339b62c2a5c9398f462 Mon Sep 17 00:00:00 2001 From: aiongg Date: Mon, 23 Nov 2026 03:06:37 +0000 Subject: [PATCH] font-catalog: name the per-file slot type (clippy type_complexity) --- crates/font-catalog/src/catalog.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/font-catalog/src/catalog.rs b/crates/font-catalog/src/catalog.rs index 1dd9f0f3f..a1325a56e 100644 --- a/crates/font-catalog/src/catalog.rs +++ b/crates/font-catalog/src/catalog.rs @@ -321,9 +321,12 @@ pub struct Catalog { loaded: Mutex>, /// The bytes of each file read, while a face of it is loaded. A file's own lock is held while it is read, so faces of /// one collection loading on several threads read it once and share the bytes. - files: Mutex>>>>>, + files: Mutex>, } +/// One file's shared bytes while any face of it is loaded, behind the lock held while the file is read. +type FileSlot = Arc>>>; + fn lock(m: &Mutex) -> MutexGuard<'_, T> { m.lock().unwrap_or_else(PoisonError::into_inner) }